[algogeeks] MS WRITTEN TEST FOR INTERNS

2011-10-02 Thread gaurav kumar
there were 10 objective questions covering c,c++ and ds
questions were on mainly memory allocation
stack and heap ,etc
output/error ;

subjective part
1. compress the given string
  eg. aaabbcccaadee
 o/p = a3b2c3de2
2. u have to give the various test case and fault cases for a USB
device
such that
 when u connect that with a camera...photo viewer wizard should be
activated
when with a computer then file transfer wizard...etc etc

-- 
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 FOR INTERNS

2011-10-02 Thread rahul sharma
hey from which college r u???

On Sun, Oct 2, 2011 at 10:51 PM, gaurav kumar mailmea...@gmail.com wrote:

 there were 10 objective questions covering c,c++ and ds
 questions were on mainly memory allocation
 stack and heap ,etc
 output/error ;

 subjective part
 1. compress the given string
  eg. aaabbcccaadee
  o/p = a3b2c3de2
 2. u have to give the various test case and fault cases for a USB
 device
 such that
  when u connect that with a camera...photo viewer wizard should be
 activated
 when with a computer then file transfer wizard...etc etc

 --
 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] MS written test

2011-09-07 Thread teja bala

Can anyone plzz xplain the code?

public static int swapOddEvenBits(int x) {
 return ( ((x  0x)  1) | ((x  0x)  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] MS written test

2011-09-07 Thread gmagog...@gmail.com
0xa == 0x 1010, which stands for all the even bits
0x5 == 0x 0101, which stands for all the odd bits

1 and 1 means shifting odd to even and even to odd

then | means putting new even bits and odd bits together

Yanan Cao



On Wed, Sep 7, 2011 at 10:23 AM, teja bala pawanjalsa.t...@gmail.comwrote:


 Can anyone plzz xplain the code?

 public static int swapOddEvenBits(int x) {
  return ( ((x  0x)  1) | ((x  0x)  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.



-- 
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-09-07 Thread sukran dhawan
which is the best site where in can find backtracking and branch and bound
programs ?

On Wed, Sep 7, 2011 at 8:58 PM, gmagog...@gmail.com gmagog...@gmail.comwrote:

 0xa == 0x 1010, which stands for all the even bits
 0x5 == 0x 0101, which stands for all the odd bits

 1 and 1 means shifting odd to even and even to odd

 then | means putting new even bits and odd bits together

 Yanan Cao



 On Wed, Sep 7, 2011 at 10:23 AM, teja bala pawanjalsa.t...@gmail.comwrote:


 Can anyone plzz xplain the code?

 public static int swapOddEvenBits(int x) {
  return ( ((x  0x)  1) | ((x  0x)  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.


  --
 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] MS written test qs

2011-08-07 Thread deepikaanand
can any1 plz gv the solution of the following problem ;-
You have to make a package library which will do the calculation of
(a^b)mod(c), where a, b, c are very large size of 1 digits. (^-
power).
Design a data structure for the numbers' storage and suggest what
functions
will you be providing to user with them. Also mention the advantages
of
using that DS.

-- 
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 qs

2011-08-07 Thread Ravinder Kumar
Method 1 :
Use character array to store large number .
Define addition  subtraction function for the following representation of
number .
Using addition  subtraction number u can write another operation for the
library e.g. multiplication , division , modulus  etc .

Method 2 :
Use Linked list to store the number for space efficiency .
Node structure is like this .

struct node {
char arr[20] ;
struct node * next ;
}

Do the rest same .

-- 
*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] MS Written Test

2011-07-26 Thread $hr! k@nth
Nybody got shortlisted in MS written test which happened on 23rd july???

On Sun, Jul 24, 2011 at 7:32 PM, Bhanu Pratap Singh bp.mn...@gmail.comwrote:

 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.




-- 
Regards,
$hr!k@nth

-- 
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-26 Thread Mukul Gupta
Well here is one good tutorial on Topcoder
http://www.topcoder.com/tc?module=Staticd1=tutorialsd2=usingTries.May be
this can help you.

On Sun, Jul 24, 2011 at 3:51 AM, 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.



-- 
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-26 Thread Mukul Gupta
here is one good tutorial on topcoder
http://www.topcoder.com/tc?module=Staticd1=tutorialsd2=usingTries  May be
this can help you.

On Sun, Jul 24, 2011 at 3:51 AM, 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.



-- 
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] 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.



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] 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] MS Written Test

2011-07-23 Thread wats my name for 2day
Hi,
Following question was asked in MS writtentest today in Bangalore(off
campus)

Give an algo to count the occurances of all words in a document. You
are
given a method chat * GetNextWord, that returns the next word from the
document.

1. Which Data Structure will you use so that the algo is very fast?
2.What is the order?

-- 
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-23 Thread ankit sambyal
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.



Re: [algogeeks] MS Written Test

2011-07-23 Thread rajeev bharshetty
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.



Re: [algogeeks] MS Written Test

2011-07-23 Thread wats my name for 2day
@ankit, rajeev
even I wrote hashtable as the answer ..

but which would be faster? Hashtabel or Trie?

-- 
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-23 Thread saurabh singh
Hashtable o(1) trie atleast o(logn)

On Sat, Jul 23, 2011 at 11:05 PM, wats my name for 2day lok...@gmail.comwrote:

 @ankit, rajeev
 even I wrote hashtable as the answer ..

 but which would be faster? Hashtabel or Trie?

 --
 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.




-- 
Saurabh Singh
B.Tech (Computer Science)
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] MS Written Test

2011-07-23 Thread varun pahwa
I think regarding memory trie would be better.

On Sat, Jul 23, 2011 at 11:08 PM, saurabh singh saurab...@gmail.com wrote:

 Hashtable o(1) trie atleast o(logn)


 On Sat, Jul 23, 2011 at 11:05 PM, wats my name for 2day 
 lok...@gmail.comwrote:

 @ankit, rajeev
 even I wrote hashtable as the answer ..

 but which would be faster? Hashtabel or Trie?

 --
 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.




 --
 Saurabh Singh
 B.Tech (Computer Science)
 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.




-- 
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] MS Written Test

2011-07-23 Thread rajeev bharshetty
It all depends on the distribution of words and their frequencies in the
input file.
But although somewhere I feel trie is better (i mean in terms of
flexibility).
Although a lot of pointers have to be maintained in trie , it really
provides an optimal solution for this problem .

On Sat, Jul 23, 2011 at 11:08 PM, saurabh singh saurab...@gmail.com wrote:

 Hashtable o(1) trie atleast o(logn)


 On Sat, Jul 23, 2011 at 11:05 PM, wats my name for 2day 
 lok...@gmail.comwrote:

 @ankit, rajeev
 even I wrote hashtable as the answer ..

 but which would be faster? Hashtabel or Trie?

 --
 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.




 --
 Saurabh Singh
 B.Tech (Computer Science)
 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.




-- 
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] MS Written Test

2011-07-23 Thread hary rathor
no aditional data structure is required , if we search in directly on input
stream.
by using Boyer-Moore string search
algorithmhttp://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string_search_algorithm.
it take Ω(n/m) or O(n).
so we do it on the fly.

Hash function has also some prolem in where target word are anagram of src
word.

-- 
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-23 Thread immanuel kingston
Trie is better in terms of scalability and performance.

With Hashtable there is a problem of rehashing when all buckets are full and
rehashing takes O(N). Although it happens once in a blue moon. That can
impact the performance in a production environment.

With trie you dont have that problem.

Thanks,
Immanuel

On Sun, Jul 24, 2011 at 12:43 AM, hary rathor harry.rat...@gmail.comwrote:

 no aditional data structure is required , if we search in directly on input
 stream.
 by using Boyer-Moore string search 
 algorithmhttp://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string_search_algorithm.
 it take Ω(n/m) or O(n).
 so we do it on the fly.

 Hash function has also some prolem in where target word are anagram of src
 word.


  --
 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] MS written test

2011-07-18 Thread sourabh chaki
Can any one please suggest the type of Microsoft written test. How many
sections are there? What are the area they mainly focus on?

In which language do I need to code? My experience is in Java. And never
worked in c/c++.Should I face any difficulties??

Are there any OS , compiler , digital logic specific questions?  Are they
ask quants?? Please share if anyone has any idea.

Thanks in advance.

Regards
Chaks

-- 
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-18 Thread SAMM
no I don't think they ask for  a specific language .they will emphasis
on algo,DS,puzzle,sql  some networking

On 7/18/11, sourabh chaki sourabh.chak...@gmail.com wrote:
 Can any one please suggest the type of Microsoft written test. How many
 sections are there? What are the area they mainly focus on?

 In which language do I need to code? My experience is in Java. And never
 worked in c/c++.Should I face any difficulties??

 Are there any OS , compiler , digital logic specific questions?  Are they
 ask quants?? Please share if anyone has any idea.

 Thanks in advance.

 Regards
 Chaks

 --
 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.




-- 
Somnath Singh

-- 
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.