[algogeeks] Re: BST in file

2011-09-25 Thread Asit Dhal
What does it mean by simple BST ?? -- 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/-/Q5mtepDUIx0J. To post to this group, send email to

[algogeeks] Re: Amazon Interview Question

2011-09-24 Thread Asit Dhal
Here, can we use function for comparison ?? -- 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/-/ZgGYGAZwvcoJ. To post to this group, send email to

[algogeeks] BST in file

2011-09-24 Thread Asit Dhal
70 /Level 2 /Level 1 Level 1 150 Level 2 120 /Level 2 Level 2 200 /level 2 /level 1 /level 0 I don't know will this be the best solution or not. Please suggest me how to approach it or some better solution. Regards Asit http://kodeyard.blogspot.com/ -- You received this message because you

[algogeeks] type 'int' unexpected

2011-06-02 Thread asit
Please consider the following code // dequeue.cpp : Defines the entry point for the console application. // #include stdafx.h #include iostream #include deque #include algorithm using namespace std; struct print { void operator() (int i) { cout i; } }myprint; int

[algogeeks] Re: Find the first K smallest element from 1 million sized array ...Amazon Question..

2011-03-16 Thread asit
I agree with munna -- 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

[algogeeks] Re: Find the first K smallest element from 1 million sized array ...Amazon Question..

2011-03-16 Thread asit
I agree with munna -- 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

Re: [algogeeks] ALgo help pls

2010-09-22 Thread Asit Baran Das
http://userweb.cs.utexas.edu/users/moore/best-ideas/mjrty/index.html _Asit On Wed, Sep 22, 2010 at 9:12 AM, pre pre.la...@gmail.com wrote: Hi all, pls help me solve this problem.. Design an algorithm to find the majority element of an array.. majority element must be an element tht has the

Re: [algogeeks] a help

2010-08-14 Thread Asit Baran Das
http://graphics.stanford.edu/~seander/bithacks.html http://graphics.stanford.edu/~seander/bithacks.htmlit has all that you need. On Sat, Aug 14, 2010 at 7:53 PM, rahul rai raikra...@gmail.com wrote: can anyone suggest me lectures / videos for BASICS of BITS manipulation? thanks in advance

Re: [algogeeks] Amazon Placement Question

2010-07-29 Thread Asit Baran Das
Use a recursive functionthis below function will add up all nodes at the same level. void Traverse(Node n,int level, LinkedList list){ if(n==null) return; if(nlist.size()) list.add(n.value); else list.set(list.get(level)+n.value); Traverse(n.left,level+1,list);

[algogeeks] Re: OS doubt

2010-06-14 Thread asit
On Jun 12, 1:22 pm, amit amitjaspal...@gmail.com wrote: OS doubt: I have read many times that say a 24 KB process enters the Main Memory selected by the Long Term Scheduler. But I don't understand what it exactly means. As far as I know Process consists of ( Code + Data(Static) +

[algogeeks] Re: unique number in an array

2010-06-14 Thread asit
Let's assume array contains only +ve numbers and maximum number is MAXNUM Take an array arr[MAXNUM] for(i=1; i=MAXNUM; i++) arr[i]=0; for(i=1; i=MAXNUM; i++) arr[a[i]]++; now print the indexes whose array value is 1 -- You received this message because you are subscribed to the