Re: [algogeeks] repeted element

2011-06-08 Thread keyan karthi
abba as goel pointed out.. is the answer 'b' or 'a' .. ie does the order in which u encounter the character matters.. 'a' comes before 'b' here... if it is 'b' then a normal buf[txt[i]-'a']++ should do.. :) On Wed, Jun 8, 2011 at 8:48 AM, Shivaji Varma shivaji...@gmail.com wrote: This problem

[algogeeks] Re: Scheduling dp problem - MSFT interview

2011-06-08 Thread pschaus
sort the jobs increasingly according to ratio: duration/penalty. It is easy to prove it's optimal for two jobs. Then you generalize the proof for n jobs easily because you can swap two consecutive jobs i,j that have duration(i)/penalty(i)duration(j)/ penalty(j) to decrease the total penalty of

Re: [algogeeks] [brain teaser ] Famous Probability puzzle SHOOT

2011-06-08 Thread Kunal Yadav
Mr. Black On Wed, Jun 8, 2011 at 12:33 PM, Lavesh Rawat lavesh.ra...@gmail.comwrote: *Famous Probability puzzle shoot * * * ** *Mr. Black, Mr. Gray, and Mr. White are fighting in a truel. They each get a gun and take turns shooting at each other until only one person is left. Mr. Black,

Re: [algogeeks] SPOJ ETF

2011-06-08 Thread kartik sachan
thanks legobut why preprocessing all time avoided?? any drawback of it? -- 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

Re: [algogeeks] Re: Scheduling dp problem - MSFT interview

2011-06-08 Thread Aakash Johari
Yes, pshaus is absolutely right. I have just confirmed it by exchange arguments. Just schedule the one first having (duration/panelty) ratio lesser. On Wed, Jun 8, 2011 at 12:01 AM, pschaus psch...@gmail.com wrote: sort the jobs increasingly according to ratio: duration/penalty. It is easy to

Re: [algogeeks] [brain teaser ] Famous Probability puzzle SHOOT

2011-06-08 Thread Naveen Kumar
Nice Answer Kunal... He will shot himself. But I didn't get the logic behind it. On Wed, Jun 8, 2011 at 12:40 PM, Kunal Yadav kunalyada...@gmail.com wrote: Mr. Black On Wed, Jun 8, 2011 at 12:33 PM, Lavesh Rawat lavesh.ra...@gmail.comwrote: *Famous Probability puzzle shoot * * * **

Re: [algogeeks] [brain teaser ] Famous Probability puzzle SHOOT

2011-06-08 Thread DeVaNsH gUpTa
In the air without aiming any of the two. On 6/8/11, Lavesh Rawat lavesh.ra...@gmail.com wrote: *Famous Probability puzzle shoot * * * ** *Mr. Black, Mr. Gray, and Mr. White are fighting in a truel. They each get a gun and take turns shooting at each other until only one person is left.

[algogeeks] Re: Odd Even Sort array

2011-06-08 Thread rj7
negate all the even indices sort the array no extra space. just an idea!! -- 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

Re: [algogeeks] Re: get rid of sohail panzer spam

2011-06-08 Thread Kunal Patil
Automatic deletion will solve the trouble only for you not for the group as such messages are not reported spam.. [?] What i do is: When i login just type in search box 'panzer'...mark all...report spam and then delete from spam box..That way they are definitely reported as spams..[?] We can't

Re: [algogeeks] [brain teaser ] Famous Probability puzzle SHOOT

2011-06-08 Thread nicks
what does the highest chance of survival ? mean.. is it about black's survival or overall survival.i'm confused On Wed, Jun 8, 2011 at 1:33 AM, DeVaNsH gUpTa devanshgupta...@gmail.comwrote: In the air without aiming any of the two. On 6/8/11, Lavesh Rawat lavesh.ra...@gmail.com

Re: [algogeeks] repeted element

2011-06-08 Thread Bhavesh agrawal
may be by using B+ tree it can be solved within O(n) time. checking conditions at the making of tree if index already present or element pointer-1 and pointer+1 positions can be checked . -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post

Re: [algogeeks] SPOJ ETF

2011-06-08 Thread saurabh singh
preprocessing is not at all a bad thing.There are certain problems where you can avoid TLE by preprocessing only.Examples include doing RMQ. But for this particular problem you are solving for all possible test cases only few of which actually occur,Moreover there is no big advantage drawn from

[algogeeks] c problem

2011-06-08 Thread coder dumca
can any one tell me why this code perfectly running and giving ouput 56 int main() { int *p=malloc(0); *p=56; printf(%d,*p); return 0; } -- 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] c problem

2011-06-08 Thread Harshal
This depends upon the implementation. Hence, your program is not portable. It's allowed to return NULL, and it's allowed to return a non-NULL pointer. Both ways are sanctioned by the Standard. On Wed, Jun 8, 2011 at 4:20 PM, coder dumca coder.du...@gmail.com wrote: can any one tell me why this

[algogeeks] please help me

2011-06-08 Thread coder dumca
I am last year student preparing for placements can any one give some ebooks on data structure, algo etc. like beofre some time , some one posted a book how to crack the coding interview that was an awesome book thanks to the guy who send the book . if anyone has some good ebooks or links

Re: [algogeeks] c problem

2011-06-08 Thread coder dumca
@harshalthanks , can u tell me how to find what features are compiler dependent On Wed, Jun 8, 2011 at 4:28 PM, Harshal hc4...@gmail.com wrote: This depends upon the implementation. Hence, your program is not portable. It's allowed to return NULL, and it's allowed to return a non-NULL

Re: [algogeeks] [brain teaser] Salman age puzzle 7 june

2011-06-08 Thread coder dumca
84 years really good . On Tue, Jun 7, 2011 at 1:49 PM, Terence technic@gmail.com wrote: 84 years. The well known Diophantus Riddle: http://en.wikipedia.org/wiki/Diophantus#Biography On 2011-6-7 16:03, Lavesh Rawat wrote: *Salman age puzzle * * * * * ** *salman's youth

Re: [algogeeks] Re: Min Enqueue Dequeue in O(1)

2011-06-08 Thread coder dumca
I have same problem to implement a to implement a stack with functions push(int) pop min() and max() in O(1) if some one know please elaborate. On Tue, Jun 7, 2011 at 11:13 PM, ross jagadish1...@gmail.com wrote: Can u pls elaborate on your approach further? On Jun 7, 10:17 pm, NIKHIL

Re: [algogeeks] Re: Samsung Bangalore is hiring a lot!!!!

2011-06-08 Thread coder dumca
to sayan nayak last year MCA students can apply please reply( with some idea abt compensation) On Tue, Jun 7, 2011 at 11:39 PM, ross jagadish1...@gmail.com wrote: @sayan: thanks for the info :) Any idea on the compensation dude? On Jun 7, 10:53 pm, sayan nayak sayanna...@gmail.com wrote:

Re: [algogeeks] [brain teaser ] Find The Next Number 6 june

2011-06-08 Thread Kunal Patil
Ohh...that was a hard one...[?] On Tue, Jun 7, 2011 at 10:30 AM, shashankreddy509 shashankreddy...@gmail.com wrote: http://mathworld.wolfram.com/TwinPrimes.html http://mathworld.wolfram.com/TwinPrimes.html have look at this link... -- You received this message because you are subscribed

[algogeeks] Cisco Expert CCIE Engineer // Daytona Beach, FL // 6 months contract

2011-06-08 Thread sohail panzer
Dear Professional, Hope you are doing well. I am a technical recruiter with Panzer Solutions LLC Software Implementing and IT consulting company located in CT. Please go through the Job Description and send me your updated resume with contact information. * Please reply at

[algogeeks] .NET Developer // New York City // 6+ months contract

2011-06-08 Thread sohail panzer
Dear Professional, Hope you are doing well. I am a technical recruiter with Panzer Solutions LLC Software Implementing and IT consulting company located in CT. Please go through the Job Description and send me your updated resume with contact information. * Please reply at

Re: [algogeeks] [brain teaser ] Famous Probability puzzle SHOOT

2011-06-08 Thread amit kumar
Mr. White On Wed, Jun 8, 2011 at 2:30 PM, nicks crazy.logic.k...@gmail.com wrote: what does the highest chance of survival ? mean.. is it about black's survival or overall survival.i'm confused On Wed, Jun 8, 2011 at 1:33 AM, DeVaNsH gUpTa devanshgupta...@gmail.comwrote: In the

Re: [algogeeks] c++ output

2011-06-08 Thread hary rathor
because compiler have know about g funtion while evaluating f -- 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] BST+Heap

2011-06-08 Thread Akshata Sharma
A rooted binary tree with keys in its nodes has the binary search tree property (BST property) if, for every node, the keys in its left subtree are smaller than its own key, and the keys in its right subtree are larger than its own key. It has the heap property if, for every node, the keys of its

[algogeeks] Websphere Commerce Administrator -- West Chester, PA -- 3 months contract

2011-06-08 Thread sohail panzer
Dear Professional, Hope you are doing well. I am a technical recruiter with Panzer Solutions LLC Software Implementing and IT consulting company located in CT. Please go through the Job Description and send me your updated resume with contact information. *Please reply at

[algogeeks] C/C++ Developer // Ft. Lauderdale, FL // 6 months contract

2011-06-08 Thread sohail panzer
Dear Professional, Hope you are doing well. I am a technical recruiter with Panzer Solutions LLC Software Implementing and IT consulting company located in CT. Please go through the Job Description and send me your updated resume with contact information. *Please reply at

Re: [algogeeks] Re: Odd Even Sort array

2011-06-08 Thread hary rathor
here DP is more effective -- 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,

[algogeeks] Microstrategy Developer // Boston , MA // 6 months Contract-to-Perm

2011-06-08 Thread sohail panzer
Dear Professional, Hope you are doing well. I am a technical recruiter with Panzer Solutions LLC Software Implementing and IT consulting company located in CT. Please go through the Job Description and send me your updated resume with contact information. *Please reply at

[algogeeks] solve the series

2011-06-08 Thread tech rascal
20 ? 150 18 11 -- 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 this

Re: [algogeeks] Re: get rid of sohail panzer spam

2011-06-08 Thread keyan karthi
:D :D On Wed, Jun 8, 2011 at 2:25 PM, Kunal Patil kp101...@gmail.com wrote: Automatic deletion will solve the trouble only for you not for the group as such messages are not reported spam.. [?] What i do is: When i login just type in search box 'panzer'...mark all...report spam and then

[algogeeks] SAP ABAP Developer // BASKING RIDGE, NJ // 3 months contract

2011-06-08 Thread sohail panzer
Dear Professional, Hope you are doing well. I am a technical recruiter with Panzer Solutions LLC Software Implementing and IT consulting company located in CT. Please go through the Job Description and send me your updated resume with contact information. *Please reply at

[algogeeks] Re: BST+Heap

2011-06-08 Thread mukesh tiwari
What you explained is the property of Treap data structure . You can have a look at wiki [ http://en.wikipedia.org/wiki/Treap ] or you can search google for treap. On Jun 8, 8:15 pm, Akshata Sharma akshatasharm...@gmail.com wrote: A rooted binary tree with keys in its nodes has the binary search

[algogeeks] FOR ALL INDIANS PLZ READ IT

2011-06-08 Thread kartik sachan
Frnz govt of india has put a condition dat lokpal bill will b implemented if 25 crore ppl spport it. plz give a miss kol(free) to 02261550789 .kol ends itself n u ll get a msg rply. Plz support against corruption... -- *WITH REGARDS,* * * *KARTIK SACHAN* *B.TECH 2ND YEAR* *COMPUTER SCIENCE

[algogeeks] FOR ALL INDIAN PLS READ IT:::::::

2011-06-08 Thread PRAMENDRA RATHi rathi
* It is request for all the indian: Frnz govt of india has put a condition dat lokpal bill will b implemented if 25 crore ppl spport it. plz give a miss kol(free) to 02261550789 .kol ends itself n u ll get a msg rply. Plz support against corruption...*

[algogeeks] Cisco Expert CCIE Engineer // Daytona Beach, FL // 3 weeks contract

2011-06-08 Thread sohail panzer
Dear Professional, Hope you are doing well. I am a technical recruiter with Panzer Solutions LLC Software Implementing and IT consulting company located in CT. Please go through the Job Description and send me your updated resume with contact information. * Please reply at

[algogeeks] SAP ABAP Developer // BASKING RIDGE, NJ // 3 months contract( possible perm)

2011-06-08 Thread sohail panzer
Dear Professional, Hope you are doing well. I am a technical recruiter with Panzer Solutions LLC Software Implementing and IT consulting company located in CT. Please go through the Job Description and send me your updated resume with contact information. *Please reply at

Re: [algogeeks] Cisco Expert CCIE Engineer // Daytona Beach, FL // 3 weeks contract

2011-06-08 Thread shady
Still posting, you are one shameless SOB, just leave this group On Thu, Jun 9, 2011 at 1:12 AM, sohail panzer sohail.panz...@gmail.comwrote: Dear Professional, Hope you are doing well. I am a technical recruiter with Panzer Solutions LLC Software Implementing and IT consulting company

[algogeeks] plz tell what is wrong in my this code... This code is for finding whether there are two numbers in array whose sum is exactly equal to given value x or not ... program is given as .cpp fi

2011-06-08 Thread D.N.Vishwakarma@IITR
thanx in advance -- **With Regards Deoki Nandan Vishwakarma IITR MCA * * -- 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] Re: plz tell what is wrong in my this code... This code is for finding whether there are two numbers in array whose sum is exactly equal to given value x or not ... program is given as .cp

2011-06-08 Thread D.N.Vishwakarma@IITR
we have to find solution in O(nlgn) On Thu, Jun 9, 2011 at 8:22 AM, D.N.Vishwakarma@IITR deok...@gmail.comwrote: thanx in advance -- **With Regards Deoki Nandan Vishwakarma IITR MCA * * -- **With Regards Deoki Nandan Vishwakarma IITR MCA * * -- You received this message because

[algogeeks] finding whether sum of two numbers of array is equal to given number or not ? plz tell why my this is not working for x=10,11,13 values

2011-06-08 Thread D.N.Vishwakarma@IITR
#includeiostream using namespace std; void merge(int A[],int p,int q,int r) { int n1=q-p+1;int n2=r-q; int L[n1]; int R[n2]; for(int i=0;in1;i++) L[i]=A[p+i]; for(int j=0;jn2;j++) R[j]=A[q+j+1]; int i=0,j=0,k; for(k=p;kr;k++) { if((L[i]=R[j])in1) {A[k]=L[i];i++;} else {A[k]=R[j];j++;} }

[algogeeks] Re: finding whether sum of two numbers of array is equal to given number or not ? plz tell why my this is not working for x=10,11,13 values

2011-06-08 Thread D.N.Vishwakarma@IITR
we have to find in O(nlgn) On Thu, Jun 9, 2011 at 10:55 AM, D.N.Vishwakarma@IITR deok...@gmail.comwrote: #includeiostream using namespace std; void merge(int A[],int p,int q,int r) { int n1=q-p+1;int n2=r-q; int L[n1]; int R[n2]; for(int i=0;in1;i++) L[i]=A[p+i]; for(int j=0;jn2;j++)

Re: [algogeeks] required ebook of Top down approach networking book 4th edition + tenanbaum os solution

2011-06-08 Thread D.N.Vishwakarma@IITR
link to tenenbaum os solutions http://www.ebah.com.br/content/ABGlsAA/tanenbaum-modern-operating-systems-2ed-solution On Wed, Jun 8, 2011 at 10:56 AM, Rahul Singhal nitk.ra...@gmail.com wrote: Dear All, If you have any ebook mentioned above, please share them. Thanks -- Rahul singhal

Re: [algogeeks] Re: finding whether sum of two numbers of array is equal to given number or not ? plz tell why my this is not working for x=10,11,13 values

2011-06-08 Thread varun pahwa
may be now it works for all. please correct me if i am wrong.you haven't put termination in binary search. #includeiostream using namespace std; void merge(int A[],int p,int q,int r) { int n1=q-p+1;int n2=r-q; int L[n1]; int R[n2]; for(int i=0;in1;i++) L[i]=A[p+i]; for(int j=0;jn2;j++)