Re: [algogeeks] Re: Suggest some Data Structure appropriate to the problem

2012-03-06 Thread Sehaj Singh Kalra
a comparison sort: Just insert n items, then then repeat n times: find min and delete that min. With your proposed time bounds, the resulting sort would be O(n). This is how you can immediately tell what you're asking for is impossible. On Mar 5, 5:51 pm, Sehaj Singh Kalra sehaj...@gmail.com wrote

[algogeeks] Suggest some Data Structure appropriate to the problem

2012-03-05 Thread Sehaj Singh Kalra
I want insertion , deletion, find (any general element) and min_element - all 4 operations in constant time order. Is there any data structure that can help me do this? - Sehaj -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this

Re: [algogeeks] Suggest some Data Structure appropriate to the problem

2012-03-05 Thread Sehaj Singh Kalra
@SAMM : Nice way to keep the track of the smallest number. But by your way we won't be able to do search in constant time. @Don : I was asked this question during an interview, so I think there must/might be some possible solution. On Tue, Mar 6, 2012 at 3:55 AM, SAMM somnath.nit...@gmail.com

Re: [algogeeks] Suggest some Data Structure appropriate to the problem

2012-03-05 Thread Sehaj Singh Kalra
Ok. Got it. I think that without the assumption that you took ( about FIFO implementation i.e. only the recent most element to be added can be deleted or else there would be problem in updating stack 2) the problem can't be done. Thanks for the proposed solution. On Tue, Mar 6, 2012 at 4:13 AM,

[algogeeks] Sms Api

2011-10-15 Thread Sehaj Singh Kalra
Does anyone knows any sms api which i can integrate with my own api? Reply asap.. its urgent... Sehaj IIT-Delhi Computer Science, 2nd sem -- 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] Binary Tree Amazon

2011-02-14 Thread SEHAJ SINGH KALRA
. let temp. Call sum_find(temp) For 2nd part : int sum=0; int sum_find(node) {if (node==null) return 0; else return ( sum + sum_find(node.left.right) + sum_find(node.right.left) )} Cheers, Sehaj Singh Kalra

Fwd: [algogeeks] Binary Tree Amazon

2011-02-14 Thread SEHAJ SINGH KALRA
HAD MISSED OUT SOPME THINGS IN PREVIOUS REPLY. SORRY GUYS hereby i rectify the mistakes: Claim: any given vertical line will start with a node.(This is obvious) Divide this problem into 2 subparts. 1st: Finding the starting node of given line. 2nd : finding the required sum. Let T

Re: [algogeeks] Special Binary Tree Again

2011-02-14 Thread SEHAJ SINGH KALRA
What is meant by : preceding P’s node in the in-order traversal of the tree ? On Mon, Feb 14, 2011 at 7:03 PM, bittu shashank7andr...@gmail.com wrote: You have a tree, in which each node has an additional pointer, P. P can either be NULL or point a node preceding P’s node in the in-order