[algogeeks] Hash map , hash table - DOUBTS!!!!

2011-07-24 Thread sivaviknesh s
what is the time complexity of a hash map??for insertion and searching

are hash table and hash map same ??

can anybody give a good explanation with example or even suggest good
links.thanks in advance :)



-- 
Regards,
$iva

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: C OUTPUT HELP

2011-07-24 Thread Rabi Chandra Shah
Hey, I guess , there is no defined order in which the function values are
evaluated .. Plz check this link ...
http://stackoverflow.com/questions/376278/parameter-evaluation-order-before-a-function-calling-in-c/376288#376288...

I think we should clear our concept on this part   However, you can also
go through this link
http://stackoverflow.com/questions/367633/what-are-all-the-common-undefined-behaviour-that-a-c-programmer-should-know-abo

Correct me if i am wrong
Rabi C Shah
IIITA

On Sat, Jul 23, 2011 at 12:43 AM, geek forgeek geekhori...@gmail.comwrote:

 @nicks -- ur code for 1st problem is giving me 1 not -1 on gcc..which
 compiler are you using


 On Fri, Jul 22, 2011 at 11:58 AM, sumit sumitispar...@gmail.com wrote:

 +1 to t3rminal


 On Jun 12, 11:38 pm, T3rminal piyush@gmail.com wrote:
  @all
  Stop guessing and making your own standards. C standards haven't
  defined anything (though in gcc arguments are processed from left to
  right) about processing arguments in a function call. And sentence
  like assgnment to a preincrement expression is delayed vry mch
  have no meaning . Seriously which book have you referred.
  This all fall in category of UNDEFINED BEHAVIOR.
  If a value of a variable is changed more than once between two
  sequence points, it give rises to side-effect which lead to undefined
  behavior.
  There is no explanation for this output supported by C standards.
  On Jun 12, 8:14 pm, varun pahwa varunpahwa2...@gmail.com wrote:
 
 
 
 
 
 
 
   yes the output is compiler dependent.
 
   On Sun, Jun 12, 2011 at 6:35 AM, nicks crazy.logic.k...@gmail.com
 wrote:
but program by anika is giving *7 6 8* on gcc.but *7 6 6 *on
dev-cpp...i am wondering if the output is compiler dependent
 !!
 
On Sun, Jun 12, 2011 at 6:33 AM, nicks crazy.logic.k...@gmail.com
 wrote:
 
no it's
a=1 b=1
i=2
 
i ran it on gcc (linux ubuntu 11.04)
 
On Sun, Jun 12, 2011 at 6:26 AM, sanjay ahuja 
 sanjayahuja.i...@gmail.com
 wrote:
 
with GCC the above code gives a = 1 and b = 2
 
On Sun, Jun 12, 2011 at 6:39 PM, nicks 
 crazy.logic.k...@gmail.com
wrote:
 @himanshuwhat abt this ??
 
 #includestdio.H
 # include conio.h
 int i=2;
 main()
 {
  void add();
  add(i++,--i);
 printf(\ni=%d \n,i);system(pause);
 }
 void add(int a ,int b)
 {
  printf(\na=%d b=%d,a,b);
 }
 
  OUTPUT -
 a=1 b=1
 i=2
 
 acc. to ur logic output should be -
 a=1 b=2
 i=2
 
 On Sun, Jun 12, 2011 at 5:42 AM, Anika Jain 
 anika.jai...@gmail.com
wrote:
 
 thanks himanshu finally i got the reason!!
 :)
 
 On Sun, Jun 12, 2011 at 5:59 PM, himanshu kansal
 himanshukansal...@gmail.com wrote:
 
 @anika:cz on gcc arguemnts r eval frm right to left and
 assgnment to
a
 pre increment expression is delayed vry mch
 so on eval frm right to left
 frst a is incremented...(6) bt remember d new value is nt
 pushed on
stack
 till nw(cz assgnmnt is delayed)
 thn next value is 6...nd thn a is incremented.here being a
 post
 increment opassgnmnt is made 1st (2nd arg to fun is 6)and
 a is
 incrementd to 7
 simalrly.assgnmnt is made(1st arg is 7) and a is
 incremnted to
8.
 nw d assgnmnt is made to the 3rd arg(d assgnmnt whch ws
 delayed till
 nw).hence 3rd arg becomes 8.
 so it prints 7 6 8..
 
 On Sun, Jun 12, 2011 at 5:33 PM, Anika Jain 
 anika.jai...@gmail.com
 wrote:
 
 can anybody explain that in following code y output is coming
 to be:
7 6
 8
 
 void call(int a,int b,int c)
 {
  printf(%d %d %d,a,b,c);
 }
 
 int main()
 {
 int a=5;
 call(a++,a++,++a);
 return 0;
 }
 
 On Sat, Jun 11, 2011 at 8:21 PM, PRAMENDRA RATHi rathi
 prathi...@gmail.com wrote:
 
 IN second program:
  in function value are always push in the stack from right.
 so first value is --i that will make i=1 and value 1 will be
 passed
to
 function
 and
 after that i++ that's means i will be passed.
 so 1 will be passed and after passing value. i will changed
 to 2.
 
 if u want to know why reverse order than can go through:
 
http://cs.nyu.edu/courses/fall03/V22.0201-003/c_param.html
 -
 PRAMENDRA RATHI
 NIT ALLAHABAD
 
 On Sat, Jun 11, 2011 at 7:28 PM, Vishal Thanki 
vishaltha...@gmail.com
 wrote:
 
 In 1st program, 2nd printf requires one more argument. And
basically
 %a is used for printing a double value in hex. see man 3
 printf.
 
 On Sat, Jun 11, 2011 at 5:29 PM, nicks 
crazy.logic.k...@gmail.com
 wrote:
  Hello friends..plz help me in understanding the following
 C
Output
 
  first one is --
 
  #includestdio.h
  #includeconio.h
  main()
  {
  int a=5;
  

Re: [algogeeks] output plzz

2011-07-24 Thread sameer.mut...@gmail.com
Declare the character strings
char five[7];
char four[7];
int three;
char two[7];
char one[7];

int his order and we get the correct output. But i dont know y?Its something
to do with Memory location where the strings are defined.










*Muthuraj R.
4TH Year BE.**
Information Science Dept*
*PESIT, Bengaluru .
*




On Sat, Jul 23, 2011 at 10:57 PM, shady sinv...@gmail.com wrote:

 anyone ?


 On Sun, Jul 24, 2011 at 2:38 AM, Anika Jain anika.jai...@gmail.comwrote:

 in this in scanf one,two, four five will b thr, no  thr..

 and sumbody plz tell afterwards this change why the o/p is
 this is 10 times charlie
 thisis10charlie

 why in 'four' empty string is going??


 On Sat, Jul 23, 2011 at 9:37 PM, geek forgeek geekhori...@gmail.comwrote:

 #includestdio.h
 main()
 {
 char outline[50];
 char one[7],two[7],four[7],five[7];
 int three;
 sprintf(outline,this is %d times %s \n,10,charlie);
 printf(%s,outline);
 sscanf(outline,%s %s %d %s %s,one,two,three,four,five);
 printf(%s,one);
 printf(%s,two);
 printf(%d,three);
 printf(%s,four);
 printf(%s,five);
 }

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] output plzz

2011-07-24 Thread Anurag atri
The output will be
This is 10 times charlie
Thisis10timescharlie

and it makes sense , this will be helpful
http://www.cplusplus.com/reference/clibrary/cstdio/sscanf/

Regards
Anurag Atri

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Prime Numbers

2011-07-24 Thread frank
thanq u  very much

On Jul 23, 10:13 pm, arun kumar kumar0...@gmail.com wrote:
 hope this link will help 
 youhttp://www.topcoder.com/tc?module=Staticd1=tutorialsd2=primalityTes...







 On Sat, Jul 23, 2011 at 10:39 PM, frank abb...@gmail.com wrote:
  what is the efficient algorith to find the prime numbers or to check a
  number prime or not ?
  Helpful if the pseudo code provided.

 thank you

  --
  You received this message because you are subscribed to the Google Groups 
  Algorithm Geeks group.
  To post to this group, send email to algogeeks@googlegroups.com.
  To unsubscribe from this group, send email to 
  algogeeks+unsubscr...@googlegroups.com.
  For more options, visit this group 
  athttp://groups.google.com/group/algogeeks?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] output plzz

2011-07-24 Thread sameer.mut...@gmail.com
@Anurag:

May i know which compiler gave you the above output?






*Muthuraj R.
4TH Year BE.**
Information Science Dept*
*PESIT, Bengaluru .
*




On Sat, Jul 23, 2011 at 11:11 PM, Anurag atri anu.anurag@gmail.comwrote:

 The output will be
 This is 10 times charlie
 Thisis10timescharlie

 and it makes sense , this will be helpful
 http://www.cplusplus.com/reference/clibrary/cstdio/sscanf/

 Regards
 Anurag Atri

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] main function

2011-07-24 Thread Arshad Alam
can main function call itself?

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] output plzz

2011-07-24 Thread shady
it is not coming like that ?

On Sun, Jul 24, 2011 at 11:41 AM, Anurag atri anu.anurag@gmail.comwrote:

 The output will be
 This is 10 times charlie
 Thisis10timescharlie

 and it makes sense , this will be helpful
 http://www.cplusplus.com/reference/clibrary/cstdio/sscanf/

 Regards
 Anurag Atri

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] main function

2011-07-24 Thread rajeev bharshetty
Yes, Main() function can call itself, but if called it will recurs e till
stack overflows or break or ext() statement occurs .

On Sun, Jul 24, 2011 at 11:52 AM, Arshad Alam alam3...@gmail.com wrote:

 can main function call itself?


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Regards
Rajeev N B http://www.opensourcemania.co.cc

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] main function

2011-07-24 Thread mridula tripathi
if u r talking abt a recursive call to a main functionusing a poiter to
the main function it can be called in C++...othrvys der vl b a stack ovrflow

On Sun, Jul 24, 2011 at 11:52 AM, Arshad Alam alam3...@gmail.com wrote:

 can main function call itself?


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] output plzz

2011-07-24 Thread sameer.mut...@gmail.com
No. Its not coming like dat.


This is 10 times charlie
Thisis10charlie


This is the output



*Muthuraj R.
4TH Year BE.**
Information Science Dept*
*PESIT, Bengaluru .
*




On Sat, Jul 23, 2011 at 11:23 PM, shady sinv...@gmail.com wrote:

 it is not coming like that ?


 On Sun, Jul 24, 2011 at 11:41 AM, Anurag atri anu.anurag@gmail.comwrote:

 The output will be
 This is 10 times charlie
 Thisis10timescharlie

 and it makes sense , this will be helpful
 http://www.cplusplus.com/reference/clibrary/cstdio/sscanf/

 Regards
 Anurag Atri

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Hash map , hash table - DOUBTS!!!!

2011-07-24 Thread rajeev bharshetty
Hash Table and hash map are same .
For insertion might take O(1) time if a good hash function is used . and
searching also O(1) considering no collisions.



On Sun, Jul 24, 2011 at 11:31 AM, sivaviknesh s sivavikne...@gmail.comwrote:

 what is the time complexity of a hash map??for insertion and searching

 are hash table and hash map same ??

 can anybody give a good explanation with example or even suggest good
 links.thanks in advance :)



 --
 Regards,
 $iva

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Regards
Rajeev N B http://www.opensourcemania.co.cc

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] output plzz

2011-07-24 Thread rajeev bharshetty
@sameer : U r right . The Fourth string is not storing any thing, its blank
..

On Sun, Jul 24, 2011 at 12:01 PM, sameer.mut...@gmail.com 
sameer.mut...@gmail.com wrote:

 No. Its not coming like dat.



 This is 10 times charlie
 Thisis10charlie


 This is the output




 *Muthuraj R.
 4TH Year BE.**
 Information Science Dept*
 *PESIT, Bengaluru .
 *




 On Sat, Jul 23, 2011 at 11:23 PM, shady sinv...@gmail.com wrote:

 it is not coming like that ?


 On Sun, Jul 24, 2011 at 11:41 AM, Anurag atri 
 anu.anurag@gmail.comwrote:

 The output will be
 This is 10 times charlie
 Thisis10timescharlie

 and it makes sense , this will be helpful
 http://www.cplusplus.com/reference/clibrary/cstdio/sscanf/

 Regards
 Anurag Atri

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Regards
Rajeev N B http://www.opensourcemania.co.cc

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] output plzz

2011-07-24 Thread Anurag atri
Dev c++ , which one are you using ?

On Sun, Jul 24, 2011 at 12:01 PM, sameer.mut...@gmail.com 
sameer.mut...@gmail.com wrote:

 No. Its not coming like dat.



 This is 10 times charlie
 Thisis10charlie


 This is the output




 *Muthuraj R.
 4TH Year BE.**
 Information Science Dept*
 *PESIT, Bengaluru .
 *




 On Sat, Jul 23, 2011 at 11:23 PM, shady sinv...@gmail.com wrote:

 it is not coming like that ?


 On Sun, Jul 24, 2011 at 11:41 AM, Anurag atri 
 anu.anurag@gmail.comwrote:

 The output will be
 This is 10 times charlie
 Thisis10timescharlie

 and it makes sense , this will be helpful
 http://www.cplusplus.com/reference/clibrary/cstdio/sscanf/

 Regards
 Anurag Atri

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Regards
Anurag Atri
III year
Computer Engineering
Delhi College Of Engineering

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Hash map , hash table - DOUBTS!!!!

2011-07-24 Thread rajeev bharshetty
http://www.jguru.com/faq/view.jsp?EID=430247

There exists some differences though in Java

On Sun, Jul 24, 2011 at 12:03 PM, rajeev bharshetty rajeevr...@gmail.comwrote:

 Hash Table and hash map are same .
 For insertion might take O(1) time if a good hash function is used . and
 searching also O(1) considering no collisions.



 On Sun, Jul 24, 2011 at 11:31 AM, sivaviknesh s sivavikne...@gmail.comwrote:

 what is the time complexity of a hash map??for insertion and searching

 are hash table and hash map same ??

 can anybody give a good explanation with example or even suggest good
 links.thanks in advance :)



 --
 Regards,
 $iva

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards
 Rajeev N B http://www.opensourcemania.co.cc




-- 
Regards
Rajeev N B http://www.opensourcemania.co.cc

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] output plzz

2011-07-24 Thread sameer.mut...@gmail.com
@Anrag: i am using gcc on Ubuntu.I also checkd it on Ideone online compiler.


But Declare the character strings
char five[7];
char four[7];
int three;
char two[7];
char one[7];

int his order and we get the correct output. But i dont know y?Its something
to do with Memory location where the strings are defined.



*Muthuraj R.
4TH Year BE.**
Information Science Dept*
*PESIT, Bengaluru .
*




On Sat, Jul 23, 2011 at 11:34 PM, Anurag atri anu.anurag@gmail.comwrote:

 Dev c++ , which one are you using ?

 On Sun, Jul 24, 2011 at 12:01 PM, sameer.mut...@gmail.com 
 sameer.mut...@gmail.com wrote:

 No. Its not coming like dat.



 This is 10 times charlie
 Thisis10charlie


 This is the output




 *Muthuraj R.
 4TH Year BE.**
 Information Science Dept*
 *PESIT, Bengaluru .
 *




 On Sat, Jul 23, 2011 at 11:23 PM, shady sinv...@gmail.com wrote:

 it is not coming like that ?


 On Sun, Jul 24, 2011 at 11:41 AM, Anurag atri 
 anu.anurag@gmail.comwrote:

 The output will be
 This is 10 times charlie
 Thisis10timescharlie

 and it makes sense , this will be helpful
 http://www.cplusplus.com/reference/clibrary/cstdio/sscanf/

 Regards
 Anurag Atri

 --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards
 Anurag Atri
 III year
 Computer Engineering
 Delhi College Of Engineering


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] output plzz

2011-07-24 Thread Anurag atri
yup , on ideone it indeed is giving the output you suggested ..


On Sun, Jul 24, 2011 at 12:10 PM, sameer.mut...@gmail.com 
sameer.mut...@gmail.com wrote:

 @Anrag: i am using gcc on Ubuntu.I also checkd it on Ideone online
 compiler.


 But Declare the character strings
 char five[7];
 char four[7];
 int three;
 char two[7];
 char one[7];

 int his order and we get the correct output. But i dont know y?Its
 something to do with Memory location where the strings are defined.



 *Muthuraj R.
 4TH Year BE.**
 Information Science Dept*
 *PESIT, Bengaluru .
 *




 On Sat, Jul 23, 2011 at 11:34 PM, Anurag atri anu.anurag@gmail.comwrote:

 Dev c++ , which one are you using ?

 On Sun, Jul 24, 2011 at 12:01 PM, sameer.mut...@gmail.com 
 sameer.mut...@gmail.com wrote:

 No. Its not coming like dat.



 This is 10 times charlie
 Thisis10charlie


 This is the output




 *Muthuraj R.
 4TH Year BE.**
 Information Science Dept*
 *PESIT, Bengaluru .
 *




 On Sat, Jul 23, 2011 at 11:23 PM, shady sinv...@gmail.com wrote:

 it is not coming like that ?


 On Sun, Jul 24, 2011 at 11:41 AM, Anurag atri anu.anurag@gmail.com
  wrote:

 The output will be
 This is 10 times charlie
 Thisis10timescharlie

 and it makes sense , this will be helpful
 http://www.cplusplus.com/reference/clibrary/cstdio/sscanf/

 Regards
 Anurag Atri

 --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards
 Anurag Atri
 III year
 Computer Engineering
 Delhi College Of Engineering


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Regards
Anurag Atri
III year
Computer Engineering
Delhi College Of Engineering

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] output plzz

2011-07-24 Thread sunny agrawal
char five[7] - string of length 7
charlie - 7 length string

declare it as char[8] u will get expected output

On Sun, Jul 24, 2011 at 12:15 PM, Anurag atri anu.anurag@gmail.comwrote:

 yup , on ideone it indeed is giving the output you suggested ..



 On Sun, Jul 24, 2011 at 12:10 PM, sameer.mut...@gmail.com 
 sameer.mut...@gmail.com wrote:

 @Anrag: i am using gcc on Ubuntu.I also checkd it on Ideone online
 compiler.


 But Declare the character strings
 char five[7];
 char four[7];
 int three;
 char two[7];
 char one[7];

 int his order and we get the correct output. But i dont know y?Its
 something to do with Memory location where the strings are defined.



 *Muthuraj R.
 4TH Year BE.**
 Information Science Dept*
 *PESIT, Bengaluru .
 *




 On Sat, Jul 23, 2011 at 11:34 PM, Anurag atri 
 anu.anurag@gmail.comwrote:

 Dev c++ , which one are you using ?

 On Sun, Jul 24, 2011 at 12:01 PM, sameer.mut...@gmail.com 
 sameer.mut...@gmail.com wrote:

 No. Its not coming like dat.



 This is 10 times charlie
 Thisis10charlie


 This is the output




 *Muthuraj R.
 4TH Year BE.**
 Information Science Dept*
 *PESIT, Bengaluru .
 *




 On Sat, Jul 23, 2011 at 11:23 PM, shady sinv...@gmail.com wrote:

 it is not coming like that ?


 On Sun, Jul 24, 2011 at 11:41 AM, Anurag atri 
 anu.anurag@gmail.com wrote:

 The output will be
 This is 10 times charlie
 Thisis10timescharlie

 and it makes sense , this will be helpful
 http://www.cplusplus.com/reference/clibrary/cstdio/sscanf/

 Regards
 Anurag Atri

 --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards
 Anurag Atri
 III year
 Computer Engineering
 Delhi College Of Engineering


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards
 Anurag Atri
 III year
 Computer Engineering
 Delhi College Of Engineering

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] output plzz

2011-07-24 Thread shady
@sunny it should have printed some garbage after 'charlie' in that case ?
that is what happens with scanf when you overwrite '\0'... isn't it ?

On Sun, Jul 24, 2011 at 12:25 PM, sunny agrawal sunny816.i...@gmail.comwrote:

 char five[7] - string of length 7
 charlie - 7 length string

 declare it as char[8] u will get expected output

 On Sun, Jul 24, 2011 at 12:15 PM, Anurag atri anu.anurag@gmail.comwrote:

 yup , on ideone it indeed is giving the output you suggested ..



 On Sun, Jul 24, 2011 at 12:10 PM, sameer.mut...@gmail.com 
 sameer.mut...@gmail.com wrote:

 @Anrag: i am using gcc on Ubuntu.I also checkd it on Ideone online
 compiler.


 But Declare the character strings
 char five[7];
 char four[7];
 int three;
 char two[7];
 char one[7];

 int his order and we get the correct output. But i dont know y?Its
 something to do with Memory location where the strings are defined.



 *Muthuraj R.
 4TH Year BE.**
 Information Science Dept*
 *PESIT, Bengaluru .
 *




 On Sat, Jul 23, 2011 at 11:34 PM, Anurag atri 
 anu.anurag@gmail.comwrote:

 Dev c++ , which one are you using ?

 On Sun, Jul 24, 2011 at 12:01 PM, sameer.mut...@gmail.com 
 sameer.mut...@gmail.com wrote:

 No. Its not coming like dat.



 This is 10 times charlie
  Thisis10charlie


 This is the output




 *Muthuraj R.
 4TH Year BE.**
 Information Science Dept*
 *PESIT, Bengaluru .
 *




 On Sat, Jul 23, 2011 at 11:23 PM, shady sinv...@gmail.com wrote:

 it is not coming like that ?


 On Sun, Jul 24, 2011 at 11:41 AM, Anurag atri 
 anu.anurag@gmail.com wrote:

 The output will be
 This is 10 times charlie
 Thisis10timescharlie

 and it makes sense , this will be helpful
 http://www.cplusplus.com/reference/clibrary/cstdio/sscanf/

 Regards
 Anurag Atri

 --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards
 Anurag Atri
 III year
 Computer Engineering
 Delhi College Of Engineering


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards
 Anurag Atri
 III year
 Computer Engineering
 Delhi College Of Engineering

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Sunny Aggrawal
 B-Tech IV year,CSI
 Indian Institute Of Technology,Roorkee


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] MS Written Test

2011-07-24 Thread varun pahwa
Use trie tree and store word count also along with the pointer. So, that
search could take at max word size time.

On Sat, Jul 23, 2011 at 10:44 PM, rajeev bharshetty rajeevr...@gmail.comwrote:

 Trie data structure can be used ? What you say guys??


 On Sat, Jul 23, 2011 at 10:43 PM, ankit sambyal ankitsamb...@gmail.comwrote:

 Use hashing with the words as key. Store the string of the word as the
 value..

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards
 Rajeev N B http://www.opensourcemania.co.cc


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Varun Pahwa
B.Tech (IT)
7th Sem.
Indian Institute of Information Technology Allahabad.
Ph : 09793899112
Official Email :: rit2008...@iiita.ac.in
Another Email :: varunpahwa.ii...@gmail.com

People who fail to plan are those who plan to fail.

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Hash map , hash table - DOUBTS!!!!

2011-07-24 Thread Rajeev Kumar
In java,Hash table is synchronized where as hash map is non
synchronized.

On Sat, Jul 23, 2011 at 11:33 PM, rajeev bharshetty rajeevr...@gmail.comwrote:

 Hash Table and hash map are same .
 For insertion might take O(1) time if a good hash function is used . and
 searching also O(1) considering no collisions.



 On Sun, Jul 24, 2011 abt 11:31 AM, sivaviknesh s 
 sivavikne...@gmail.comwrote:

 what is the time complexity of a hash map??for insertion and searching

 are hash table and hash map same ??

 can anybody give a good explanation with example or even suggest good
 links.thanks in advance :)



 --
 Regards,
 $iva

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards
 Rajeev N B http://www.opensourcemania.co.cc

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Thank You
Rajeev Kumar

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] output plzz

2011-07-24 Thread sunny agrawal
Can't say but that seems to be the issue to me
To get the final answer need to explore Stack contents.

On Sun, Jul 24, 2011 at 12:34 PM, shady sinv...@gmail.com wrote:

 @sunny it should have printed some garbage after 'charlie' in that case ?
 that is what happens with scanf when you overwrite '\0'... isn't it ?


 On Sun, Jul 24, 2011 at 12:25 PM, sunny agrawal 
 sunny816.i...@gmail.comwrote:

 char five[7] - string of length 7
 charlie - 7 length string

 declare it as char[8] u will get expected output

 On Sun, Jul 24, 2011 at 12:15 PM, Anurag atri 
 anu.anurag@gmail.comwrote:

 yup , on ideone it indeed is giving the output you suggested ..



 On Sun, Jul 24, 2011 at 12:10 PM, sameer.mut...@gmail.com 
 sameer.mut...@gmail.com wrote:

 @Anrag: i am using gcc on Ubuntu.I also checkd it on Ideone online
 compiler.


 But Declare the character strings
 char five[7];
 char four[7];
 int three;
 char two[7];
 char one[7];

 int his order and we get the correct output. But i dont know y?Its
 something to do with Memory location where the strings are defined.



 *Muthuraj R.
 4TH Year BE.**
 Information Science Dept*
 *PESIT, Bengaluru .
 *




 On Sat, Jul 23, 2011 at 11:34 PM, Anurag atri anu.anurag@gmail.com
  wrote:

 Dev c++ , which one are you using ?

 On Sun, Jul 24, 2011 at 12:01 PM, sameer.mut...@gmail.com 
 sameer.mut...@gmail.com wrote:

 No. Its not coming like dat.



 This is 10 times charlie
  Thisis10charlie


 This is the output




 *Muthuraj R.
 4TH Year BE.**
 Information Science Dept*
 *PESIT, Bengaluru .
 *




 On Sat, Jul 23, 2011 at 11:23 PM, shady sinv...@gmail.com wrote:

 it is not coming like that ?


 On Sun, Jul 24, 2011 at 11:41 AM, Anurag atri 
 anu.anurag@gmail.com wrote:

 The output will be
 This is 10 times charlie
 Thisis10timescharlie

 and it makes sense , this will be helpful
 http://www.cplusplus.com/reference/clibrary/cstdio/sscanf/

 Regards
 Anurag Atri

 --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards
 Anurag Atri
 III year
 Computer Engineering
 Delhi College Of Engineering


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards
 Anurag Atri
 III year
 Computer Engineering
 Delhi College Of Engineering

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Sunny Aggrawal
 B-Tech IV year,CSI
 Indian Institute Of Technology,Roorkee


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.





Re: [algogeeks] C ouput

2011-07-24 Thread sagar pareek
@ambika
20 questions of MCQ with negative marking
mostly C/DS
then 1-2 que of OS
then puzzle and apti

2 questions of programming
longest increasing subarray and spiral matrix printing

On Sat, Jul 23, 2011 at 8:30 PM, Akshata Sharma
akshatasharm...@gmail.comwrote:

 Thanks all :) its clear now..


 On Sat, Jul 23, 2011 at 6:37 PM, ambika iyer balu200...@gmail.com wrote:

 @sagar : what was the question paper pattern for amazon

 On Sat, Jul 23, 2011 at 6:32 PM, radha krishnan 
 radhakrishnance...@gmail.com wrote:

 same question in MS written :P


 On Sat, Jul 23, 2011 at 5:49 AM, Manish Kumar manish.monu...@gmail.com
 wrote:
  @Akshata:
  Whenever you increase any variable then it increases according to its
 type.
  Here the address of array 'a' is being increased.(  a+1 ).
  so the address of 'a' will temporarily increased to 20 bytes and then
 that
  is assigned to ptr.
  so ptr is now pointing to any value in the memory just after the memory
  where 5 is stored.
  so when we print ptr[-1] it prints 5.
  I think it should be clear now.at

  if not,plz let me inform.
 
  --
  You received this message because you are subscribed to the Google
 Groups
  Algorithm Geeks group.
  To post to this group, send email to algogeeks@googlegroups.com.
  To unsubscribe from this group, send email to
  algogeeks+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/algogeeks?hl=en.
 

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Ambi :)

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
**Regards
SAGAR PAREEK
COMPUTER SCIENCE AND ENGINEERING
NIT ALLAHABAD

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: doubt in evaluating in expression

2011-07-24 Thread sagar pareek
nope compiler read it from left to right

On Sun, Jul 24, 2011 at 12:05 AM, Arun Vishwanathan
aaron.nar...@gmail.comwrote:

 @sagar: if what u said previously holds as in when u say y=x++ + ++x is
 evaluated as 4+4 since ++x results in 4 and 4 is used in x++ too (cos post
 increment increments x later) then for y=x++ + ++x + ++x with x beginning as
 3 shud the expression not be evaluated as 5+5+4( from rhs ++x does a 3 to 4
 and another ++x does 4 to 5 and 5 is used in x++) .later x becomes 6 ?




 On Sat, Jul 23, 2011 at 2:39 PM, sagar pareek sagarpar...@gmail.comwrote:

 sorry for above...typo mistake :-

 yup
 but what about this
 x=3;
  y= x++ + ++x + ++x; // it is executed as:-

 during first addition, increase the value of x, now first addition will be
 4+4 + ++x;
 now for second addition it will be like
 8+5
 hence final value of y=13;
 do it by urself

 On Sat, Jul 23, 2011 at 6:09 PM, sagar pareek sagarpar...@gmail.comwrote:

 yup
 but what about this
 x=4;
 y= x++ + ++x + ++x; // it is executed as:-

 during first addition, increase the value of x, now first addition will
 be 4+4 + ++x;
 now for second addition it will be like
 8+5
 hence final value of y=13;
 do it by urself

 On Sat, Jul 23, 2011 at 2:54 PM, shady sinv...@gmail.com wrote:

 @sagar
 would it get evaluated like this ?
 supposing x = 3;

 y = x++ + ++x; becomes y = (x=x+1) + (x=x+1);
 then x=x+1;

 so x = 5, y = 8;

 On Sat, Jul 23, 2011 at 2:48 PM, sagar pareek sagarpar...@gmail.comwrote:

 @Venga
 if u are doing this
 y= x++ + ++x; //x=3
 then it would be
 like that :-
 ++x; //x=4
 y=x+x;
 x++;

 i thing this is sufficient  :)

 On Sat, Jul 23, 2011 at 1:20 PM, Interstellar Overdrive 
 abhi123khat...@gmail.com wrote:

 The expression y = x++ + x++ + ++y;  is not a valid one. The result
 is compiler dependent
 Read this for reference :http://c-faq.com/expr/seqpoints.html






  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/-DWyCxlftwgJ.

 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 **Regards
 SAGAR PAREEK
 COMPUTER SCIENCE AND ENGINEERING
 NIT ALLAHABAD

  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 **Regards
 SAGAR PAREEK
 COMPUTER SCIENCE AND ENGINEERING
 NIT ALLAHABAD




 --
 **Regards
 SAGAR PAREEK
 COMPUTER SCIENCE AND ENGINEERING
 NIT ALLAHABAD

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Arun Vish
 Graduate Student
 Department of Computer Science
 University of Southern California

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
**Regards
SAGAR PAREEK
COMPUTER SCIENCE AND ENGINEERING
NIT ALLAHABAD

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] C ouput

2011-07-24 Thread ambika iyer
@sagar : thnx !!!

On Sun, Jul 24, 2011 at 1:44 PM, sagar pareek sagarpar...@gmail.com wrote:

 @ambika
 20 questions of MCQ with negative marking
 mostly C/DS
 then 1-2 que of OS
 then puzzle and apti

 2 questions of programming
 longest increasing subarray and spiral matrix printing


 On Sat, Jul 23, 2011 at 8:30 PM, Akshata Sharma akshatasharm...@gmail.com
  wrote:

 Thanks all :) its clear now..


 On Sat, Jul 23, 2011 at 6:37 PM, ambika iyer balu200...@gmail.comwrote:

 @sagar : what was the question paper pattern for amazon

 On Sat, Jul 23, 2011 at 6:32 PM, radha krishnan 
 radhakrishnance...@gmail.com wrote:

 same question in MS written :P


 On Sat, Jul 23, 2011 at 5:49 AM, Manish Kumar manish.monu...@gmail.com
 wrote:
  @Akshata:
  Whenever you increase any variable then it increases according to its
 type.
  Here the address of array 'a' is being increased.(  a+1 ).
  so the address of 'a' will temporarily increased to 20 bytes and then
 that
  is assigned to ptr.
  so ptr is now pointing to any value in the memory just after the
 memory
  where 5 is stored.
  so when we print ptr[-1] it prints 5.
  I think it should be clear now.at

  if not,plz let me inform.
 
  --
  You received this message because you are subscribed to the Google
 Groups
  Algorithm Geeks group.
  To post to this group, send email to algogeeks@googlegroups.com.
  To unsubscribe from this group, send email to
  algogeeks+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/algogeeks?hl=en.
 

 --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Ambi :)

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 **Regards
 SAGAR PAREEK
 COMPUTER SCIENCE AND ENGINEERING
 NIT ALLAHABAD

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Ambi :)

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: doubt in evaluating in expression

2011-07-24 Thread Arun Vishwanathan
if that is the case as u say, then wont it be 3+ 4+ 5 when x +3
initially?..and then x increments by one later due to the single post
increment

On Sun, Jul 24, 2011 at 10:15 AM, sagar pareek sagarpar...@gmail.comwrote:

 nope compiler read it from left to right


 On Sun, Jul 24, 2011 at 12:05 AM, Arun Vishwanathan 
 aaron.nar...@gmail.com wrote:

 @sagar: if what u said previously holds as in when u say y=x++ + ++x is
 evaluated as 4+4 since ++x results in 4 and 4 is used in x++ too (cos post
 increment increments x later) then for y=x++ + ++x + ++x with x beginning as
 3 shud the expression not be evaluated as 5+5+4( from rhs ++x does a 3 to 4
 and another ++x does 4 to 5 and 5 is used in x++) .later x becomes 6 ?




 On Sat, Jul 23, 2011 at 2:39 PM, sagar pareek sagarpar...@gmail.comwrote:

 sorry for above...typo mistake :-

 yup
 but what about this
 x=3;
  y= x++ + ++x + ++x; // it is executed as:-

 during first addition, increase the value of x, now first addition will
 be 4+4 + ++x;
 now for second addition it will be like
 8+5
 hence final value of y=13;
 do it by urself

 On Sat, Jul 23, 2011 at 6:09 PM, sagar pareek sagarpar...@gmail.comwrote:

 yup
 but what about this
 x=4;
 y= x++ + ++x + ++x; // it is executed as:-

 during first addition, increase the value of x, now first addition will
 be 4+4 + ++x;
 now for second addition it will be like
 8+5
 hence final value of y=13;
 do it by urself

 On Sat, Jul 23, 2011 at 2:54 PM, shady sinv...@gmail.com wrote:

 @sagar
 would it get evaluated like this ?
 supposing x = 3;

 y = x++ + ++x; becomes y = (x=x+1) + (x=x+1);
 then x=x+1;

 so x = 5, y = 8;

 On Sat, Jul 23, 2011 at 2:48 PM, sagar pareek 
 sagarpar...@gmail.comwrote:

 @Venga
 if u are doing this
 y= x++ + ++x; //x=3
 then it would be
 like that :-
 ++x; //x=4
 y=x+x;
 x++;

 i thing this is sufficient  :)

 On Sat, Jul 23, 2011 at 1:20 PM, Interstellar Overdrive 
 abhi123khat...@gmail.com wrote:

 The expression y = x++ + x++ + ++y;  is not a valid one. The result
 is compiler dependent
 Read this for reference :http://c-faq.com/expr/seqpoints.html






  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/-DWyCxlftwgJ.

 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 **Regards
 SAGAR PAREEK
 COMPUTER SCIENCE AND ENGINEERING
 NIT ALLAHABAD

  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 **Regards
 SAGAR PAREEK
 COMPUTER SCIENCE AND ENGINEERING
 NIT ALLAHABAD




 --
 **Regards
 SAGAR PAREEK
 COMPUTER SCIENCE AND ENGINEERING
 NIT ALLAHABAD

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Arun Vish
 Graduate Student
 Department of Computer Science
 University of Southern California

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 **Regards
 SAGAR PAREEK
 COMPUTER SCIENCE AND ENGINEERING
 NIT ALLAHABAD

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Arun Vish
Graduate Student
Department of Computer Science
University of Southern California

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to 

Re: [algogeeks] Re: doubt in evaluating in expression

2011-07-24 Thread Arun Vishwanathan
*x= 3 initially

On Sun, Jul 24, 2011 at 11:00 AM, Arun Vishwanathan
aaron.nar...@gmail.comwrote:

 if that is the case as u say, then wont it be 3+ 4+ 5 when x +3
 initially?..and then x increments by one later due to the single post
 increment


 On Sun, Jul 24, 2011 at 10:15 AM, sagar pareek sagarpar...@gmail.comwrote:

 nope compiler read it from left to right


 On Sun, Jul 24, 2011 at 12:05 AM, Arun Vishwanathan 
 aaron.nar...@gmail.com wrote:

 @sagar: if what u said previously holds as in when u say y=x++ + ++x is
 evaluated as 4+4 since ++x results in 4 and 4 is used in x++ too (cos post
 increment increments x later) then for y=x++ + ++x + ++x with x beginning as
 3 shud the expression not be evaluated as 5+5+4( from rhs ++x does a 3 to 4
 and another ++x does 4 to 5 and 5 is used in x++) .later x becomes 6 ?




 On Sat, Jul 23, 2011 at 2:39 PM, sagar pareek sagarpar...@gmail.comwrote:

 sorry for above...typo mistake :-

 yup
 but what about this
 x=3;
  y= x++ + ++x + ++x; // it is executed as:-

 during first addition, increase the value of x, now first addition will
 be 4+4 + ++x;
 now for second addition it will be like
 8+5
 hence final value of y=13;
 do it by urself

 On Sat, Jul 23, 2011 at 6:09 PM, sagar pareek sagarpar...@gmail.comwrote:

 yup
 but what about this
 x=4;
 y= x++ + ++x + ++x; // it is executed as:-

 during first addition, increase the value of x, now first addition will
 be 4+4 + ++x;
 now for second addition it will be like
 8+5
 hence final value of y=13;
 do it by urself

 On Sat, Jul 23, 2011 at 2:54 PM, shady sinv...@gmail.com wrote:

 @sagar
 would it get evaluated like this ?
 supposing x = 3;

 y = x++ + ++x; becomes y = (x=x+1) + (x=x+1);
 then x=x+1;

 so x = 5, y = 8;

 On Sat, Jul 23, 2011 at 2:48 PM, sagar pareek 
 sagarpar...@gmail.comwrote:

 @Venga
 if u are doing this
 y= x++ + ++x; //x=3
 then it would be
 like that :-
 ++x; //x=4
 y=x+x;
 x++;

 i thing this is sufficient  :)

 On Sat, Jul 23, 2011 at 1:20 PM, Interstellar Overdrive 
 abhi123khat...@gmail.com wrote:

 The expression y = x++ + x++ + ++y;  is not a valid one. The result
 is compiler dependent
 Read this for reference :http://c-faq.com/expr/seqpoints.html






  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/-DWyCxlftwgJ.

 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 **Regards
 SAGAR PAREEK
 COMPUTER SCIENCE AND ENGINEERING
 NIT ALLAHABAD

  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 **Regards
 SAGAR PAREEK
 COMPUTER SCIENCE AND ENGINEERING
 NIT ALLAHABAD




 --
 **Regards
 SAGAR PAREEK
 COMPUTER SCIENCE AND ENGINEERING
 NIT ALLAHABAD

  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Arun Vish
 Graduate Student
 Department of Computer Science
 University of Southern California

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 **Regards
 SAGAR PAREEK
 COMPUTER SCIENCE AND ENGINEERING
 NIT ALLAHABAD

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Arun Vish
 Graduate Student
 Department of Computer Science
 University of Southern California




-- 
Arun Vish
Graduate Student
Department of Computer 

Re: [algogeeks] MS Written Test

2011-07-24 Thread Akash Mukherjee
sorry if it seems to be off the topic, but any good resources for trie
for a newbie??

thanks :)

On Sat, Jul 23, 2011 at 11:02 PM, varun pahwa varunpahwa2...@gmail.com wrote:
 Use trie tree and store word count also along with the pointer. So, that
 search could take at max word size time.

 On Sat, Jul 23, 2011 at 10:4 4 PM, rajeev bharshetty rajeevr...@gmail.com
 wrote:

 Trie data structure can be used ? What you say guys??

 On Sat, Jul 23, 2011 at 10:43 PM, ankit sambyal ankitsamb...@gmail.com
 wrote:

 Use hashing with the words as key. Store the string of the word as the
 value..

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards
 Rajeev N B

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



 --
 Varun Pahwa
 B.Tech (IT)
 7th Sem.
 Indian Institute of Information Technology Allahabad.
 Ph : 09793899112
 Official Email :: rit2008...@iiita.ac.in
 Another Email :: varunpahwa.ii...@gmail.com

 People who fail to plan are those who plan to fail.

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] MS Written Test

2011-07-24 Thread rajeev bharshetty
http://www.youtube.com/watch?v=uhAUk63tLRM

This would be helpful

On Sun, Jul 24, 2011 at 4:21 PM, Akash Mukherjee akash...@gmail.com wrote:

 sorry if it seems to be off the topic, but any good resources for trie
 for a newbie??

 thanks :)

 On Sat, Jul 23, 2011 at 11:02 PM, varun pahwa varunpahwa2...@gmail.com
 wrote:
  Use trie tree and store word count also along with the pointer. So, that
  search could take at max word size time.
 
  On Sat, Jul 23, 2011 at 10:4 4 PM, rajeev bharshetty 
 rajeevr...@gmail.com
  wrote:
 
  Trie data structure can be used ? What you say guys??
 
  On Sat, Jul 23, 2011 at 10:43 PM, ankit sambyal ankitsamb...@gmail.com
 
  wrote:
 
  Use hashing with the words as key. Store the string of the word as the
  value..
 
  --
  You received this message because you are subscribed to the Google
 Groups
  Algorithm Geeks group.
  To post to this group, send email to algogeeks@googlegroups.com.
  To unsubscribe from this group, send email to
  algogeeks+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/algogeeks?hl=en.
 
 
 
 
  --
  Regards
  Rajeev N B
 
  --
  You received this message because you are subscribed to the Google
 Groups
  Algorithm Geeks group.
  To post to this group, send email to algogeeks@googlegroups.com.
  To unsubscribe from this group, send email to
  algogeeks+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/algogeeks?hl=en.
 
 
 
  --
  Varun Pahwa
  B.Tech (IT)
  7th Sem.
  Indian Institute of Information Technology Allahabad.
  Ph : 09793899112
  Official Email :: rit2008...@iiita.ac.in
  Another Email :: varunpahwa.ii...@gmail.com
 
  People who fail to plan are those who plan to fail.
 
  --
  You received this message because you are subscribed to the Google Groups
  Algorithm Geeks group.
  To post to this group, send email to algogeeks@googlegroups.com.
  To unsubscribe from this group, send email to
  algogeeks+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/algogeeks?hl=en.
 

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Regards
Rajeev N B http://www.opensourcemania.co.cc

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Amazon telephone interview

2011-07-24 Thread veera reddy
Hi all,
   I have amazon telephone interview scheduled on next friday , If anybody
had already gone through telephone interview process  of amazon , could you
please suggest what to study and what are the most likely topics there  are
going to ask .

-- 
Regards ,
P  Veera Reddy Devagiri
Senior Under Graduate
Computer Science and Engineering
IIIT Hyderabad
Mobile no-+91-9492024783

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] MS Written Test

2011-07-24 Thread Akash Mukherjee
@rajeev  ty :)

On Sun, Jul 24, 2011 at 4:24 PM, rajeev bharshetty rajeevr...@gmail.com wrote:
 http://www.youtube.com/watch?v=uhAUk63tLRM
 This would be helpful

 On Sun, Jul 24, 2011 at 4:21 PM, Akash Mukherjee akash...@gmail.com wrote:

 sorry if it seems to be off the topic, but any good resources for trie
 for a newbie??

 thanks :)

 On Sat, Jul 23, 2011 at 11:02 PM, varun pahwa varunpahwa2...@gmail.com
 wrote:
  Use trie tree and store word count also along with the pointer. So, that
  search could take at max word size time.
 
  On Sat, Jul 23, 2011 at 10:4 4 PM, rajeev bharshetty
  rajeevr...@gmail.com
  wrote:
 
  Trie data structure can be used ? What you say guys??
 
  On Sat, Jul 23, 2011 at 10:43 PM, ankit sambyal
  ankitsamb...@gmail.com
  wrote:
 
  Use hashing with the words as key. Store the string of the word as the
  value..
 
  --
  You received this message because you are subscribed to the Google
  Groups
  Algorithm Geeks group.
  To post to this group, send email to algogeeks@googlegroups.com.
  To unsubscribe from this group, send email to
  algogeeks+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/algogeeks?hl=en.
 
 
 
 
  --
  Regards
  Rajeev N B
 
  --
  You received this message because you are subscribed to the Google
  Groups
  Algorithm Geeks group.
  To post to this group, send email to algogeeks@googlegroups.com.
  To unsubscribe from this group, send email to
  algogeeks+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/algogeeks?hl=en.
 
 
 
  --
  Varun Pahwa
  B.Tech (IT)
  7th Sem.
  Indian Institute of Information Technology Allahabad.
  Ph : 09793899112
  Official Email :: rit2008...@iiita.ac.in
  Another Email :: varunpahwa.ii...@gmail.com
 
  People who fail to plan are those who plan to fail.
 
  --
  You received this message because you are subscribed to the Google
  Groups
  Algorithm Geeks group.
  To post to this group, send email to algogeeks@googlegroups.com.
  To unsubscribe from this group, send email to
  algogeeks+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/algogeeks?hl=en.
 

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards
 Rajeev N B

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Amazon telephone interview

2011-07-24 Thread UMESH KUMAR
Are U freshers and How would U scheduled Interview in amazon ??

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Amazon telephone interview

2011-07-24 Thread veera reddy
ya  i am a fresher . One of my senior forwarded  my resume sometime back . I
have given one online written test , i cleared it . Next round is, this
telephone interview

On Sun, Jul 24, 2011 at 5:11 PM, UMESH KUMAR kumar.umesh...@gmail.comwrote:

 Are U freshers and How would U scheduled Interview in amazon ??



  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Regards ,
P  Veera Reddy Devagiri
Senior Under Graduate
Computer Science and Engineering
IIIT Hyderabad
Mobile no-+91-9492024783

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: C ouput

2011-07-24 Thread siva viknesh
@sagarcan u plz post tat 20 ques whatever u
remembercoming friday we ve amazon interview...it d be of
great help bro :)

On Jul 24, 1:14 pm, sagar pareek sagarpar...@gmail.com wrote:
 @ambika
 20 questions of MCQ with negative marking
 mostly C/DS
 then 1-2 que of OS
 then puzzle and apti

 2 questions of programming
 longest increasing subarray and spiral matrix printing

 On Sat, Jul 23, 2011 at 8:30 PM, Akshata Sharma
 akshatasharm...@gmail.comwrote:









  Thanks all :) its clear now..

  On Sat, Jul 23, 2011 at 6:37 PM, ambika iyer balu200...@gmail.com wrote:

  @sagar : what was the question paper pattern for amazon

  On Sat, Jul 23, 2011 at 6:32 PM, radha krishnan 
  radhakrishnance...@gmail.com wrote:

  same question in MS written :P

  On Sat, Jul 23, 2011 at 5:49 AM, Manish Kumar manish.monu...@gmail.com
  wrote:
   @Akshata:
   Whenever you increase any variable then it increases according to its
  type.
   Here the address of array 'a' is being increased.(  a+1 ).
   so the address of 'a' will temporarily increased to 20 bytes and then
  that
   is assigned to ptr.
   so ptr is now pointing to any value in the memory just after the memory
   where 5 is stored.
   so when we print ptr[-1] it prints 5.
   I think it should be clear now.at

   if not,plz let me inform.

   --
   You received this message because you are subscribed to the Google
  Groups
   Algorithm Geeks group.
   To post to this group, send email to algogeeks@googlegroups.com.
   To unsubscribe from this group, send email to
   algogeeks+unsubscr...@googlegroups.com.
   For more options, visit this group at
  http://groups.google.com/group/algogeeks?hl=en.

  --
  You received this message because you are subscribed to the Google Groups
  Algorithm Geeks group.
  To post to this group, send email to algogeeks@googlegroups.com.
  To unsubscribe from this group, send email to
  algogeeks+unsubscr...@googlegroups.com.
  For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.

  --
  Ambi :)

  --
  You received this message because you are subscribed to the Google Groups
  Algorithm Geeks group.
  To post to this group, send email to algogeeks@googlegroups.com.
  To unsubscribe from this group, send email to
  algogeeks+unsubscr...@googlegroups.com.
  For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.

   --
  You received this message because you are subscribed to the Google Groups
  Algorithm Geeks group.
  To post to this group, send email to algogeeks@googlegroups.com.
  To unsubscribe from this group, send email to
  algogeeks+unsubscr...@googlegroups.com.
  For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.

 --
 **Regards
 SAGAR PAREEK
 COMPUTER SCIENCE AND ENGINEERING
 NIT ALLAHABAD

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Interleaving two strings using recursion

2011-07-24 Thread SkRiPt KiDdIe
Can u specify an Xample.

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] MS Written Test

2011-07-24 Thread Bhanu Pratap Singh
We can also use, c++ map... for implementing this!
-- 
*with regards ...
Bhanu P Singh (B!||-I~)
B.Tech Final Year
Computer Science And Engineering
MNNIT Allahabad.*

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] fibonacci

2011-07-24 Thread nullpointer
#includestdio.h
main()
{int a,b,n,fib=0;
a=0,b=1;
scanf(%d,n);
if(n==0||n==1)
printf(%d\n,n);
while(n--!=0)
{

fib=a+b;
a=b;
b=fib;
printf(%d+,fib);

}
}

for n = 3 o/p is 1+2+3+
how to remve that extra '+' at the end of 3 so that o/p become 1+2+3


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Nagarro Coding Round Ques......

2011-07-24 Thread UMESH KUMAR
Using the all characters of a given String how to specify either
a palindrome or not.

Ex:-

1) String=teste
After arrange all character we can made a palindrome String as teset
So output is TRUE.

2)String=hello
we can not made a palindrome String
output is FALSE

bool IspalindromePossible (String str)
{
}


Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] fibonacci

2011-07-24 Thread naveen ms
main()
{int a,b,n,fib=0;
a=0,b=1;
scanf(%d,n);
if(n==0||n==1)
printf(%d\n,n);
while(n--!=0)
{

fib=a+b;
a=b;
b=fib;
if(n)
printf(%d+,fib);
else
printf(%d,fib);

}
getch();
}

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] fibonacci

2011-07-24 Thread vaibhav shukla
add printf(\b);  after while loop

On Sun, Jul 24, 2011 at 7:54 PM, nullpointer nullpointer...@gmail.comwrote:

 #includestdio.h
 main()
 {int a,b,n,fib=0;
 a=0,b=1;
 scanf(%d,n);
 if(n==0||n==1)
 printf(%d\n,n);
 while(n--!=0)
 {

 fib=a+b;
 a=b;
 b=fib;
 printf(%d+,fib);

 }
 }

 for n = 3 o/p is 1+2+3+
 how to remve that extra '+' at the end of 3 so that o/p become 1+2+3


 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
  best wishes!!
Vaibhav
  MCA

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Any good book on design patterns?

2011-07-24 Thread Swathi


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] fibonacci

2011-07-24 Thread naveen ms
ya ...even that works..

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Any good book on design patterns (C++, not JAVA)?

2011-07-24 Thread Swathi
Hi,

I am interested in design patterns book for C++ (not JAVA).
If anyone has good material then please forward me..

Thanks,
Balu

On Sun, Jul 24, 2011 at 8:02 PM, Swathi chukka.swa...@gmail.com wrote:




-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] fibonacci

2011-07-24 Thread naveen ms
hey if n is 0 or 1..then \b wont work...i mean there ll be no output at all

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Any good book on design patterns (C++, not JAVA)?

2011-07-24 Thread Swathi
Hi,

I am interested in design patterns book for C++ (not JAVA).
If anyone has good material then please forward me..

Thanks,
Swathi

On Sun, Jul 24, 2011 at 8:02 PM, Swathi chukka.swa...@gmail.com wrote:




-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Nagarro Coding Round Ques......

2011-07-24 Thread vaibhav shukla
generate all possible permutations and check each permutation whether it is
palindrome or not.

On Sun, Jul 24, 2011 at 7:55 PM, UMESH KUMAR kumar.umesh...@gmail.comwrote:

 Using the all characters of a given String how to specify either
 a palindrome or not.

 Ex:-

 1) String=teste
 After arrange all character we can made a palindrome String as teset
 So output is TRUE.

 2)String=hello
 we can not made a palindrome String
 output is FALSE

 bool IspalindromePossible (String str)
 {
 }


 Thanks



  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
  best wishes!!
Vaibhav
  MCA

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] fibonacci

2011-07-24 Thread vaibhav shukla
then too it will work. the purpose is just to eliminate the last plus sign

On Sun, Jul 24, 2011 at 8:04 PM, naveen ms naveenms...@gmail.com wrote:

 hey if n is 0 or 1..then \b wont work...i mean there ll be no output at all

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
  best wishes!!
Vaibhav
  MCA

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Nagarro Coding Round Ques......

2011-07-24 Thread sasi kumar
On 24 July 2011 20:04, vaibhav shukla vaibhav200...@gmail.com wrote:
 generate all possible permutations and check each permutation whether it is
 palindrome or not.


 The time complexity will be high. Instead find the length of the
string . If it is even check the number of occurences
of every character . If a character occurs for an odd number of time
then it will not be a palindrome. Check for even number of
occurences of every character.  If the length of the string is odd .
One character must occur odd number of time .

  So the problem can be solved just by counting

Regards
Sasi kumar T

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] fibonacci

2011-07-24 Thread naveen ms
ya...coz new line is printed in the first PRINTF..it works fine..:)

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] output please

2011-07-24 Thread Arshad Alam
#includestdio.h
#includeconio.h
void main()
{
char ch=200;
printf(\n%d,ch);
getch();
}

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] fibonacci

2011-07-24 Thread vaibhav shukla
:) :)

On Sun, Jul 24, 2011 at 8:14 PM, naveen ms naveenms...@gmail.com wrote:

 ya...coz new line is printed in the first PRINTF..it works fine..:)

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
  best wishes!!
Vaibhav
  MCA

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Amazon

2011-07-24 Thread Agyat
recently, MS visited our campus ..and i saw that same questions
were repeated in ANNA univ. so it will be helpful to post question if
some company visits your campusi've heard that amazon is
visiting nit warangal on 28 , so guys from warangal please post
questionsas it might be helpful for us...

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Nagarro Coding Round Ques......

2011-07-24 Thread naveen ms
@sasi kumar:...gud 1

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Nagarro Coding Round Ques......

2011-07-24 Thread SkRiPt KiDdIe
#includestring
using namespace std;

int main()
{

int x=0;
string str;

cinstr;//only lowercase

for(int i=0;istr.size();i++) x^=(1(str[i]-97));

if(str.size()1)
{  if(!(x(x-1)))coutPalindrome\n;
else coutNot palindrome\n;
}
else
{if(!x)coutPalindrome\n;
else coutNot palindrome\n;
}
return 0;
}

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Nagarro Coding Round Ques......

2011-07-24 Thread Ravinder Kumar
 if(!(x(x-1)))cout
Palindrome\n;

didn't get this peace of code 
can you explain .

On Sun, Jul 24, 2011 at 3:52 PM, SkRiPt KiDdIe anuragmsi...@gmail.comwrote:

 #includestring
 using namespace std;

 int main()
 {

 int x=0;
 string str;

 cinstr;//only lowercase

 for(int i=0;istr.size();i++) x^=(1(str[i]-97));

 if(str.size()1)
 {  if(!(x(x-1)))coutPalindrome\n;
 else coutNot palindrome\n;
 }
 else
 {if(!x)coutPalindrome\n;
 else coutNot palindrome\n;
 }
 return 0;

 }

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*With Regards :*

Ravinder Kumar
B.Tech 3rd Year
Computer Science and Engineering
MNNIT Allahabad

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Nagarro Coding Round Ques......

2011-07-24 Thread SkRiPt KiDdIe
check power of 2.

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Amazon

2011-07-24 Thread Akash Mukherjee
wud be glad if u cud post all the ms questions 2 :)

On Sun, Jul 24, 2011 at 8:19 PM, Agyat jalsa.n.sa...@gmail.com wrote:
 recently, MS visited our campus ..and i saw that same questions
 were repeated in ANNA univ. so it will be helpful to post question if
 some company visits your campusi've heard that amazon is
 visiting nit warangal on 28 , so guys from warangal please post
 questionsas it might be helpful for us...

 --
 You received this message because you are subscribed to the Google Groups 
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to 
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/algogeeks?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Amazon

2011-07-24 Thread swetha rahul
We have also Amazon coming up this week.. Please do post the questions if u
have any...!!

On Sun, Jul 24, 2011 at 8:19 PM, Agyat jalsa.n.sa...@gmail.com wrote:

 recently, MS visited our campus ..and i saw that same questions
 were repeated in ANNA univ. so it will be helpful to post question if
 some company visits your campusi've heard that amazon is
 visiting nit warangal on 28 , so guys from warangal please post
 questionsas it might be helpful for us...

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Nagarro Coding Round Ques......

2011-07-24 Thread Ravinder Kumar
why are you checking power of 2 there can be any character at last .

On Sun, Jul 24, 2011 at 4:10 PM, SkRiPt KiDdIe anuragmsi...@gmail.comwrote:

 check power of 2.

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*With Regards :*

Ravinder Kumar
B.Tech Final Year
Computer Science and Engineering
MNNIT Allahabad

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Nagarro Coding Round Ques......

2011-07-24 Thread Ravinder Kumar
got it ..

On Sun, Jul 24, 2011 at 5:02 PM, Ravinder Kumar ravinde...@gmail.comwrote:

 why are you checking power of 2 there can be any character at last .


 On Sun, Jul 24, 2011 at 4:10 PM, SkRiPt KiDdIe anuragmsi...@gmail.comwrote:

 check power of 2.

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 *With Regards :*

 Ravinder Kumar
 B.Tech Final Year

 Computer Science and Engineering
 MNNIT Allahabad




-- 
*With Regards :*

Ravinder Kumar
B.Tech Final Year
Computer Science and Engineering
MNNIT Allahabad

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] recursion ???

2011-07-24 Thread nullpointer
#include stdio.h
#include string.h
void printit(char line_of_char[], int index);
int main()
{
char line_of_char[80];
int index = -1;
 strcpy(line_of_char, 1234567890);
 printit(line_of_char, index);
 return 0;
}
void printit(char line_of_char[], int index)
{
 if(line_of_char[index])
 {
  index++;
  printf(+%c, line_of_char[index]); /*how come this is not being
printed after - was printed*/
  printit(line_of_char, index);
  printf(-%c, line_of_char[index]);
 }
}
o/p=+1+2+3+4+5+6+7+8+9+0+--0-9-8-7-6-5-4-3-2-1
can anyone explain how this program is working( why +-- between two
zero's  and how second printf is returning value in recursion)

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: [offTopic] Any one attended Informatica Interview

2011-07-24 Thread Rahul Menon
I am placed! :)

On Jul 20, 9:43 pm, Reynald Suz reynaldsus...@gmail.com wrote:
 Round-1 :Aptitude (OS, SQL, Data Structures  Problem Solving)
 Round-2: Technical Interview - (Qns from UNIX/DB/Algorithms)
 Round-3: Technical Interview - (Qns with regard to projects you have done)
 Round-4: HR interview

 On Wed, Jul 20, 2011 at 9:25 PM, Rahul Menon menonrahul1...@gmail.comwrote:

  I would like if any here have attended informatica interview
  and also about the interview procedure.

  --
  You received this message because you are subscribed to the Google Groups
  Algorithm Geeks group.
  To post to this group, send email to algogeeks@googlegroups.com.
  To unsubscribe from this group, send email to
  algogeeks+unsubscr...@googlegroups.com.
  For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.

 --
 Regards
 Reynald Reni
 Masters in Software Engineering
 CIT - India

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] output please

2011-07-24 Thread Prashant Gupta
-56

On Sun, Jul 24, 2011 at 8:15 PM, Arshad Alam alam3...@gmail.com wrote:

 #includestdio.h
 #includeconio.h
 void main()
 {
 char ch=200;
 printf(\n%d,ch);
 getch();
 }

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Prashant Gupta
B.Tech Final Year
Computer Science and Engineering
NIT Trichy
Phone : +91 9894462744

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] output please

2011-07-24 Thread rajeev bharshetty
value 200 exceeds the char range so -56 , to print 200 try unsigned char .

On Sun, Jul 24, 2011 at 10:06 PM, Prashant Gupta
prashantatn...@gmail.comwrote:

 -56


 On Sun, Jul 24, 2011 at 8:15 PM, Arshad Alam alam3...@gmail.com wrote:

 #includestdio.h
 #includeconio.h
 void main()
 {
 char ch=200;
 printf(\n%d,ch);
 getch();
 }

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Prashant Gupta
 B.Tech Final Year
 Computer Science and Engineering
 NIT Trichy
 Phone : +91 9894462744


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Regards
Rajeev N B http://www.opensourcemania.co.cc

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] where to find good interview puzzles??

2011-07-24 Thread skumar
Can anybody tell me where i should practice interview puzzles from???

Thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: where to find good interview puzzles??

2011-07-24 Thread Jai
You may find some here... http://www.gotaninterviewcall.com/forum/?cat=11

On Jul 24, 9:47 pm, skumar shiv2004...@gmail.com wrote:
 Can anybody tell me where i should practice interview puzzles from???

 Thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: where to find good interview puzzles??

2011-07-24 Thread Vivek Srivastava
Hello Jai,
Here is a collection of few links which you can use to prepare for high
quality interviews which are mostly asked in Microsoft and few  other start
up companies.But most of the question asked these days are variants of these
questions.
http://www.coders2020.com/microsoft-interview-questions-and-puzzles

http://www.geekinterview.com/talk/companies/

http://classic-puzzles.blogspot.com/2006/12/microsoft-puzzle-coins-on-table.html

http://www.bigriddles.com/microsoft-interview-riddles


On Sun, Jul 24, 2011 at 10:42 PM, Jai businessguruar...@gmail.com wrote:

 You may find some here... http://www.gotaninterviewcall.com/forum/?cat=11

 On Jul 24, 9:47 pm, skumar shiv2004...@gmail.com wrote:
  Can anybody tell me where i should practice interview puzzles from???
 
  Thanks in advance

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: [offTopic] Any one attended Informatica Interview

2011-07-24 Thread Reynald Suz
Congrats! Which team did pick you up? Global Customer Support, Dev or
Testing  QA.

On Sun, Jul 24, 2011 at 9:57 PM, Rahul Menon menonrahul1...@gmail.comwrote:

 I am placed! :)

 On Jul 20, 9:43 pm, Reynald Suz reynaldsus...@gmail.com wrote:
  Round-1 :Aptitude (OS, SQL, Data Structures  Problem Solving)
  Round-2: Technical Interview - (Qns from UNIX/DB/Algorithms)
  Round-3: Technical Interview - (Qns with regard to projects you have
 done)
  Round-4: HR interview
 
  On Wed, Jul 20, 2011 at 9:25 PM, Rahul Menon menonrahul1...@gmail.com
 wrote:
 
   I would like if any here have attended informatica interview
   and also about the interview procedure.
 
   --
   You received this message because you are subscribed to the Google
 Groups
   Algorithm Geeks group.
   To post to this group, send email to algogeeks@googlegroups.com.
   To unsubscribe from this group, send email to
   algogeeks+unsubscr...@googlegroups.com.
   For more options, visit this group at
  http://groups.google.com/group/algogeeks?hl=en.
 
  --
  Regards
  Reynald Reni
  Masters in Software Engineering
  CIT - India

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Regards
Reynald Reni
Masters in Software Engineering
CIT - India

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Amazon

2011-07-24 Thread Agyat
ms asked 10 ques related to c...3 ques from coding..like
shortest pair of points among some points.find bug and write test
cases for reversing a stringdesign a lift for n floor...

On Jul 24, 8:47 pm, swetha rahul swetharahu...@gmail.com wrote:
 We have also Amazon coming up this week.. Please do post the questions if u
 have any...!!

 On Sun, Jul 24, 2011 at 8:19 PM, Agyat jalsa.n.sa...@gmail.com wrote:
  recently, MS visited our campus ..and i saw that same questions
  were repeated in ANNA univ. so it will be helpful to post question if
  some company visits your campusi've heard that amazon is
  visiting nit warangal on 28 , so guys from warangal please post
  questionsas it might be helpful for us...

  --
  You received this message because you are subscribed to the Google Groups
  Algorithm Geeks group.
  To post to this group, send email to algogeeks@googlegroups.com.
  To unsubscribe from this group, send email to
  algogeeks+unsubscr...@googlegroups.com.
  For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Amazon

2011-07-24 Thread naveen ms
@agyat:...could u elaborate it..n mention few questions if u remember!!

regards
naveen

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] C aps sources plz

2011-07-24 Thread ~*~VICKY~*~
Hi all, as i find it hard to find a site that has a collection of non
obvious or fairly hard  c aps sites anywhere, i seek help here. plz post if
u find any source proving to be useful.


-- 
Cheers,

  Vicky

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Prime Numbers

2011-07-24 Thread Ankur Garg
Do take a look at this also

http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes#cite_note-7

Source code to list all prime numbers till number n

#includeiostream
#includealgorithm
#define bool int
using namespace std;
int main(){
   int n;
   cinn;
   int i,j;
   bool primeValues[1000]={0};
   for(i=4;i=n;i=i+2){
  primeValues[i] = 1;
   }
   for(i=3;i*i=n;i=i+2){
  for(j=2;jn/i;j++)
primeValues[i*j] = 1;
   }
   for(i=2;in;i++){
 if(primeValues[i] == 0)
cout i ;
   }

}


On Sun, Jul 24, 2011 at 11:51 AM, frank abb...@gmail.com wrote:

 thanq u  very much

 On Jul 23, 10:13 pm, arun kumar kumar0...@gmail.com wrote:
  hope this link will help youhttp://
 www.topcoder.com/tc?module=Staticd1=tutorialsd2=primalityTes...
 
 
 
 
 
 
 
  On Sat, Jul 23, 2011 at 10:39 PM, frank abb...@gmail.com wrote:
   what is the efficient algorith to find the prime numbers or to check a
   number prime or not ?
   Helpful if the pseudo code provided.
 
  thank you
 
   --
   You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
   To post to this group, send email to algogeeks@googlegroups.com.
   To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
   For more options, visit this group athttp://
 groups.google.com/group/algogeeks?hl=en.

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: stacks

2011-07-24 Thread Kamakshii Aggarwal
thanks all.:)

On Sun, Jul 24, 2011 at 1:05 AM, Gaurav Popli gpgaurav.n...@gmail.comwrote:

 it is given in tanenbaum

 On Sat, Jul 23, 2011 at 9:49 PM, Pankaj jatka.oppimi...@gmail.com wrote:
  Can you please tell us from where we can find such questions?
 
  On Sat, Jul 23, 2011 at 4:21 PM, Nikhil Gupta nikhilgupta2...@gmail.com
 
  wrote:
 
  Nice question Kamakshi. The person above has given almost a perfect
  answer.
  For example i=3, we will pop the elements one by one from the top of the
  1st stack and pushed to the 2nd stack until the value (top - i) is
 reached.
 
  On Sat, Jul 23, 2011 at 3:52 PM, ross jagadish1...@gmail.com wrote:
 
  Well. the idea of an array is - given an integer 'i', you should
  support RANDOM ACCESS to the ith element in the 1d array.
  Since, we have two stacks, if you want to access an ith element ( say,
  i = 5 ),pop all the top 4 elements from the 1st stack and push it to
  the second stack.
  Now, access the 5th element on top of the 1st stack, then, pop the
  elements from the 2nd stack back and push them to the 1st stack.
  However, access is O(n) due to the inherent property of a stack which
  forbids random access!
 
 
  On Jul 23, 2:00 pm, Kamakshii Aggarwal kamakshi...@gmail.com wrote:
   consider a language that does no have arrays...but u can define stack
   data
   type like
   stack s;
   using pop ,push and other operations on  2 stacks,how can one
   dimensions
   array can be implemented??
  
   --
   Regards,
   Kamakshi
   kamakshi...@gmail.com
 
  --
  You received this message because you are subscribed to the Google
 Groups
  Algorithm Geeks group.
  To post to this group, send email to algogeeks@googlegroups.com.
  To unsubscribe from this group, send email to
  algogeeks+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/algogeeks?hl=en.
 
 
 
 
  --
  Nikhil Gupta
  Senior Co-ordinator, Publicity
  CSI, NSIT Students' Branch
  NSIT, New Delhi, India
 
  --
  You received this message because you are subscribed to the Google
 Groups
  Algorithm Geeks group.
  To post to this group, send email to algogeeks@googlegroups.com.
  To unsubscribe from this group, send email to
  algogeeks+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/algogeeks?hl=en.
 
  --
  You received this message because you are subscribed to the Google Groups
  Algorithm Geeks group.
  To post to this group, send email to algogeeks@googlegroups.com.
  To unsubscribe from this group, send email to
  algogeeks+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/algogeeks?hl=en.
 

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Regards,
Kamakshi
kamakshi...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Amazon

2011-07-24 Thread priyanka goel
if any1 can post Oracle Apps questions.. pl post...

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: stacks

2011-07-24 Thread sanjay ahuja
It will be good optimisation to keep the elements in second stack
itself after first random access. Maintaining count of elements in
both stack and pop from second stack can result in less number of push
and pop operation for subsequent random access.

On Sat, Jul 23, 2011 at 3:52 PM, ross jagadish1...@gmail.com wrote:
 Well. the idea of an array is - given an integer 'i', you should
 support RANDOM ACCESS to the ith element in the 1d array.
 Since, we have two stacks, if you want to access an ith element ( say,
 i = 5 ),pop all the top 4 elements from the 1st stack and push it to
 the second stack.
 Now, access the 5th element on top of the 1st stack, then, pop the
 elements from the 2nd stack back and push them to the 1st stack.
 However, access is O(n) due to the inherent property of a stack which
 forbids random access!


 On Jul 23, 2:00 pm, Kamakshii Aggarwal kamakshi...@gmail.com wrote:
 consider a language that does no have arrays...but u can define stack data
 type like
 stack s;
 using pop ,push and other operations on  2 stacks,how can one dimensions
 array can be implemented??

 --
 Regards,
 Kamakshi
 kamakshi...@gmail.com

 --
 You received this message because you are subscribed to the Google Groups 
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to 
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/algogeeks?hl=en.





-- 
Sanjay Ahuja,
Analyst, Financing Prime Brokerage
Nomura Securities India Pvt. Ltd

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] recursion ???

2011-07-24 Thread sanjay ahuja
+ which follows 0 is due to null character at the end of the string
and it will not be printed on the console. -  which follows  +  is
due to same reason. The null character is returning condition from the
recursion, after that each character of string preceded by - is
printed on the screen

On Sun, Jul 24, 2011 at 9:43 PM, nullpointer nullpointer...@gmail.com wrote:
 #include stdio.h
 #include string.h
 void printit(char line_of_char[], int index);
 int main()
 {
 char line_of_char[80];
 int index = -1;
  strcpy(line_of_char, 1234567890);
  printit(line_of_char, index);
  return 0;
 }
 void printit(char line_of_char[], int index)
 {
  if(line_of_char[index])
  {
  index++;
  printf(+%c, line_of_char[index]); /*how come this is not being
 printed after - was printed*/
  printit(line_of_char, index);
  printf(-%c, line_of_char[index]);
  }
 }
 o/p=+1+2+3+4+5+6+7+8+9+0+--0-9-8-7-6-5-4-3-2-1
 can anyone explain how this program is working( why +-- between two
 zero's  and how second printf is returning value in recursion)

 --
 You received this message because you are subscribed to the Google Groups 
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to 
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/algogeeks?hl=en.





-- 
Sanjay Ahuja,
Analyst, Financing Prime Brokerage
Nomura Securities India Pvt. Ltd

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Amazon

2011-07-24 Thread Reynald Suz
Please post Thoughtworks question. Thanks.

On Mon, Jul 25, 2011 at 12:51 AM, priyanka goel priya888g...@gmail.comwrote:

 if any1 can post Oracle Apps questions.. pl post...

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Regards
Reynald Reni
Masters in Software Engineering
CIT - India

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Microsoft Technical Interview - Round 2 Qn

2011-07-24 Thread Reynald
Find the possible class and the methods in it for “Snakes and ladders
game”. (HR asked to use Design Patterns if needed)

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.