Re: [algogeeks] Indus Valley Partners Paper Pattern

2012-08-20 Thread vipul jain
...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Thanks Regards Vipul Jain -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks

Re: [algogeeks] Indus Valley Partners Paper Pattern

2012-08-20 Thread vipul jain
this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Thanks Regards Vipul Jain lVth yr Information Technology Nit Jaipur -- You received this message because you are subscribed to the Google

Re: [algogeeks] Re: Directi Question

2011-08-07 Thread Vipul Sharma
@kunal patil: U were proceeding in correct way...in next series u cud hav seen a formation of arithmatico geometric series... It doesnt matter what the value of no of faces in a dice is..ans will be always 2...:) My simplified soln: o+e+1 o=probability of odd number coming in 1 throw of dice

Re: [algogeeks] c++ probs

2011-07-16 Thread Vipul Kumar
Output of 1st is constructing A constructing B destructing *A* * * as destructor is not virtual only the base class destructor is called and during object creation first base class constructor is called then derived class during the derived class object creation. output of 2nd : the object of

Re: [algogeeks] BST

2011-06-18 Thread Vipul Kumar
traverse the BST , get the count of no. of nodes . now inorder traverse again till n/2 . and print that node On Sat, Jun 18, 2011 at 11:18 PM, Akshata Sharma akshatasharm...@gmail.com wrote: How to find median of a Binary Search Tree without storing it in a linear data structure by in-order

Re: [algogeeks] 5th largest element

2011-06-06 Thread Vipul Kumar
This is called finding the k-th order statistic study the topic from cormen its there. On Mon, Jun 6, 2011 at 12:15 PM, the coder coder.du...@gmail.com wrote: hi friendz given an array  how to find the k th largest element  in O(N) complexity. -- You received this message because you are

Re: [algogeeks] box packing

2011-06-04 Thread Vipul Kumar
For rotation case, take all the orientation of a box in account and now apply the same algo On Sat, Jun 4, 2011 at 3:13 PM, Piyush Sinha ecstasy.piy...@gmail.com wrote: For the rotation case, sort on the basis of volume... On 6/4/11, NIKHIL nikhil.jain.shali...@gmail.com wrote: given the

Re: [algogeeks] Google

2011-06-03 Thread Vipul Kumar
convert the trees to DLL and then merge them to get the combined sorted DLL , now create the AVl tree of that DLL. On Fri, Jun 3, 2011 at 3:47 PM, Piyush Sinha ecstasy.piy...@gmail.com wrote: Do the postorder traversal of the 2nd AVL tree and keep inserting the value in the 1st AVL

Re: [algogeeks] Google

2011-06-03 Thread Vipul Kumar
dude u have left right pointers in tree use those for next /back. On Fri, Jun 3, 2011 at 5:13 PM, Piyush Sinha ecstasy.piy...@gmail.com wrote: m talking in terms of pointers.. On 6/3/11, Vipul Kumar vipul.k.r...@gmail.com wrote: no,use the node of the tree as the node of the LL . On Fri

Re: [algogeeks] Google

2011-06-03 Thread Vipul Kumar
, Vipul Kumar vipul.k.r...@gmail.com wrote: dude u have left right pointers in tree use those for next /back. On Fri, Jun 3, 2011 at 5:13 PM, Piyush Sinha ecstasy.piy...@gmail.com wrote: m talking in terms of pointers.. On 6/3/11, Vipul Kumar vipul.k.r...@gmail.com wrote: no,use the node

Re: [algogeeks] Binary Tree Problem

2011-05-30 Thread Vipul Kumar
That is same as finding the diameter of the tree. On Mon, May 30, 2011 at 1:44 PM, Piyush Sinha ecstasy.piy...@gmail.com wrote: There can be two cases to it Case 1 - The maximum distance passes through the root node.    1 /   \    2 3    

Re: [algogeeks] suitable data structure

2011-05-26 Thread Vipul Kumar
Map , key will be the wrong wrd , so lookup will be O(1). On Thu, May 26, 2011 at 10:07 PM, himanshu kansal himanshukansal...@gmail.com wrote: if a large no of documents are available and need to find out the spelling errors.for this the words are compared wd a dictionary fileif a word

[algogeeks] Re: minimum no. of clicks

2011-02-03 Thread vipul
Hi, My approach:- 3 1 2 1 4 1 2 1 4 3 2 1) Find matching element from start and end. here it willl be 3 2) Perfrom (#1) for sub array 1 2 1 4 1 2 1 4 here it will be 2 1 4 1 2 4 left out 3) Perfrom (#1) on 2 1 4 1 2 here it will be 1 4 1 4) Perform (#1) on 1 4 1

[algogeeks] Re: What can be done in c but not c++?

2010-12-20 Thread vipul
class is keyword in C++ but not in C. void main() { int class =0; return; } On Dec 17, 2:35 am, siva viknesh sivavikne...@gmail.com wrote: We can assign any type of pointer to void pointer without cast in c but not in c++. Declare variable names that are keywords in C++ but not C.

Re: [algogeeks] Re: AMAZON Interview Question

2010-07-13 Thread Vipul Agrawal
// sort ar[] and store in temp[] -- o(nlogn) for(i=0 to n-1) { //search position of ar[i] in temp[] binary search --o(logn) ar_low[i] = pos-1; delete temp[pos]; } in binary search increase pos until next element is same . On Tue, Jul 13, 2010 at 4:09 PM, Amir