[algogeeks] Re: priority inversion

2011-06-21 Thread ricky
process is pre-empted with out giving up the resouces, might give rise to dead lock. On Mon, Jun 20, 2011 at 10:05 AM, ricky moon.afr...@gmail.com wrote: In priority inversion the high priority process has to wait for the low priority process. why can't it just preempt the low priority

[algogeeks] priority inversion

2011-06-20 Thread ricky
In priority inversion the high priority process has to wait for the low priority process. why can't it just preempt the low priority one instead of waiting? Is it becoz it will jeopardize system stability or something else? -- You received this message because you are subscribed to the Google

[algogeeks] Re: spoj--two squares problem

2011-05-26 Thread ricky
thanks :) it worked. cheers On May 25, 12:12 pm, Saikat Debnath crazysai...@gmail.com wrote: I think your problem is you are using int. Use long long. On Thu, May 26, 2011 at 12:29 AM, ricky moon.afr...@gmail.com wrote: can anyone help me out with this problem: https://www.spoj.pl

[algogeeks] Re: FUN TEASER 11 may

2011-05-13 Thread Ricky
Nice one anil On May 13, 11:47 am, arjoo kumar 2009ar...@gmail.com wrote: good answer On Wed, May 11, 2011 at 8:52 PM, anil chopra anil.chopra2...@gmail.comwrote: i will stop imaging. On Wed, May 11, 2011 at 7:38 PM, Dave dave_and_da...@juno.com wrote: I was on a river boat

[algogeeks] Re: Good question

2011-02-06 Thread Ricky
Try following code Suppose  we need to find size of variable *obj* int size = (char*)(obj +1 ) - (char*)(obj); * *Thanks Regards, Ricky On Mon, Feb 7, 2011 at 12:19 AM, albert theboss alberttheb...@gmail.comwrote: using this macro size(X)  ((X*)0+1) if we give size(int

[algogeeks] C++ Riddle

2011-02-06 Thread Ricky
write the program to add two numbers without using arithmetic and bit operation.. -- 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] Microsoft Written test questions required

2011-02-02 Thread Ricky
Hi Guys, I want to know about questions asked in written test for Microsoft. I come to know that it will be for 1.5 hours and it will consists of questions from c,C++ and data structure. I am writing the test this weekend only. So please send me questions ASAP. -- You received this message

[algogeeks] Re: Microsoft Written Test Questions

2011-02-02 Thread Ricky
Hi Have u already wrote the test? If yes please share the questions. Thanks On Jan 27, 6:47 am, Ankit Babbar ankitbabba...@gmail.com wrote: Hey all...Can anyone provide me with the recent (/most common) written test questions(or links ) of Microsoft IDC and Microsoft IT SDE positions...??

[algogeeks] Puzzle to Puzzle you Part _ 1

2011-02-02 Thread Ricky
Hi, I have come up with one interesting puzzle so I thought of discussing with you guys: A blind man is given deck of 52 cards with 10 card facing up and rest are facing down. He need to create two piles not necessarily of same height in order to have same number of up cards in both. I would

[algogeeks] Re: Generating a Sequence Subject To Constraints

2006-02-03 Thread ricky
there are two components to your algorithm. the first component is (as gene pointed out) is to generate a random number. the second component is to verify the violations for the generated integers. the violation verfication is a function of two things: the previous sequence of numbers and the set

[algogeeks] Re: longest common subsequence problem

2006-01-24 Thread ricky
you can store the two strings in an upside down suffix tree. a simple edge scan of common path will give you all possible (and largest) common substring

[algogeeks] Re: Given an array containing both positive and negative integers, we r required to find the sub-array with the largest sum

2006-01-24 Thread ricky
Think of the negative numbers as consumers from a warehouse and positive numbers as producers from the warehouse. The problem reduces to plotting the inventory (starting from time = 0 to time = n) and then finding the max amplitude over time axis in +ve quadrant of the inventory profile which can