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

[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

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 wrote: > 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

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 wrote: > > Can anyone plzz

[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@goo

Re: [algogeeks] MS written test qs

2011-08-06 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

[algogeeks] MS written test qs

2011-08-06 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

Re: [algogeeks] MS Written Test

2011-07-26 Thread Mukul Gupta
here is one good tutorial on topcoder http://www.topcoder.com/tc?module=Static&d1=tutorials&d2=usingTries May be this can help you. On Sun, Jul 24, 2011 at 3:51 AM, Akash Mukherjee wrote: > sorry if it seems to be off the topic, but any good resources for trie > for a newbie?? > > thanks :) > >

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=Static&d1=tutorials&d2=usingTries.May be this can help you. On Sun, Jul 24, 2011 at 3:51 AM, Akash Mukherjee wrote: > sorry if it seems to be off the topic, but any good resources for trie > for a newbie?? > > thanks :)

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 wrote: > We can also use, c++ map... for implementing this! > -- > *with regards ... > Bhanu P Singh (B!||-I~) > B.Tech Final Year > Computer Science And Engineering > MNNI

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

Re: [algogeeks] MS Written Test

2011-07-24 Thread Akash Mukherjee
@rajeev ty :) On Sun, Jul 24, 2011 at 4:24 PM, rajeev bharshetty wrote: > http://www.youtube.com/watch?v=uhAUk63tLRM > This would be helpful > > On Sun, Jul 24, 2011 at 4:21 PM, Akash Mukherjee wrote: >> >> sorry if it seems to be off the topic, but any good resources for trie >> for a newbie??

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 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 > wrote: > > Use tr

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

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 wrote: > Trie data structure can be used ? What you say guys?? > > > On Sat, Jul 23, 2011 at 10:43 PM, ankit sambyal wrote: > >> Us

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

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 algorithm. it take Ω(n/m) or O(n). so we do it on the fly. Hash function has also some prolem in where ta

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, 2

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 wrote: > Hashtable o(1) trie atleast o(logn) > > > On Sat, Jul 23, 2011 at 11:05 PM, wats my name for 2day > wrote: > >> @ankit, rajeev >> even I wrote hashtable as the answer .. >> >> but which would

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 wrote: > @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 > "Alg

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 gr

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 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" gr

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 alg

[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 "ver

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

[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