Re: [algogeeks] MS Question

2011-06-02 Thread Ashish Goel
wouldn't it be skip list or a circular DLL what if we have next as well as next-next pointers in every node. If the LL is say a-bcd if a-b is corrupted, a-c can be used to reach rest of the LL if say b-c is corrupt, a-c can be used to recover complete list... is this better or skip list? Best

Re: [algogeeks] MS Question

2011-06-02 Thread Logic King
I Think circular DLL should do...skip list is not required !! On Thu, Jun 2, 2011 at 5:31 AM, Ashish Goel ashg...@gmail.com wrote: wouldn't it be skip list or a circular DLL what if we have next as well as next-next pointers in every node. If the LL is say a-bcd if a-b is corrupted, a-c can

Re: [algogeeks] MS Question

2011-06-02 Thread Ashish Goel
the problem here is what if more than 1 pointers are corrupt? Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 On Thu, Jun 2, 2011 at 6:35 PM, Logic King crazy.logic.k...@gmail.comwrote: I Think circular DLL should do...skip list is not required !!

Re: [algogeeks] MS Question

2011-06-02 Thread Logic King
hmm...then skip list is surely a better option On Thu, Jun 2, 2011 at 7:04 AM, Ashish Goel ashg...@gmail.com wrote: the problem here is what if more than 1 pointers are corrupt? Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 On Thu, Jun 2,

[algogeeks] MS Q

2011-06-02 Thread Ashish Goel
Given a function to draw a circle with input paramters as co-ordinates of centre of the circle and r is the radius of the circle. How will you test this function, what will be additional non-functional test cases Best Regards Ashish Goel Think positive and find fuel in failure +919985813081

[algogeeks] MS question

2011-06-02 Thread Balaji S
#include stdio.h int main() { int a=3, b = 5; printf(a[Ya!Hello! how is this? %s\n], b[junk/super]); printf(a[WHAT%c%c%c %c%c %c !\n], 1[this], 2[beauty],0[tool],0[is],3[sensitive],4[CC]); return 0; } -- With Regards,     Balaji.S -- You received this

Re: [algogeeks] MS question

2011-06-02 Thread Anika Jain
Does it work?? On Thu, Jun 2, 2011 at 10:30 PM, Balaji S balaji.ceg...@gmail.com wrote: #include stdio.h int main() { int a=3, b = 5; printf(a[Ya!Hello! how is this? %s\n], b[junk/super]); printf(a[WHAT%c%c%c %c%c %c !\n], 1[this],

Re: [algogeeks] MS question

2011-06-02 Thread Aakash Johari
Output should be: Hello! how is this? super That is C On Thu, Jun 2, 2011 at 10:38 AM, Anika Jain anika.jai...@gmail.com wrote: Does it work?? On Thu, Jun 2, 2011 at 10:30 PM, Balaji S balaji.ceg...@gmail.com wrote: #include stdio.h int main() { int a=3, b = 5;

Re: [algogeeks] MS question

2011-06-02 Thread Senthil S
Output Hello! how is this? super That is C! -- 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] MS question

2011-06-02 Thread Harshal
what do they want to test by asking such a question! On Thu, Jun 2, 2011 at 11:17 PM, Senthil S senthil2...@gmail.com wrote: Output Hello! how is this? super That is C! -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this

Re: [algogeeks] MS question

2011-06-02 Thread Sachin Jain
Can someone please explain how is this working ?? On Thu, Jun 2, 2011 at 11:24 PM, Harshal hc4...@gmail.com wrote: what do they want to test by asking such a question! On Thu, Jun 2, 2011 at 11:17 PM, Senthil S senthil2...@gmail.com wrote: Output Hello! how is this? super That is C!

Re: [algogeeks] MS question

2011-06-02 Thread Balaji S
how s that output obtained?? -- 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

Re: [algogeeks] MS question

2011-06-02 Thread himanshu kansal
in c str[i] can be indexed using anthr notation i.e i[str] also bt m nt getting hw hello! how is this gets printedsince its format specifier i.e %s occurs aftr the string... On Thu, Jun 2, 2011 at 11:40 PM, Balaji S balaji.ceg...@gmail.com wrote: how s that output obtained?? --

Re: [algogeeks] MS question

2011-06-02 Thread radha krishnan
@balaji :) This is a question But don tell this is a MS quesiton :P :P :P On Thu, Jun 2, 2011 at 11:40 PM, Balaji S balaji.ceg...@gmail.com wrote: how s that output obtained?? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to

Re: [algogeeks] MS Q

2011-06-02 Thread Sachin Jain
Can you please tell What are we testing here ?. I mean to ask what is the output of the function.. On Thu, Jun 2, 2011 at 7:49 PM, Ashish Goel ashg...@gmail.com wrote: Given a function to draw a circle with input paramters as co-ordinates of centre of the circle and r is the radius of the

Re: [algogeeks] MS question

2011-06-02 Thread shashankreddy509
Can any one explain the output of this... i have a guess. int a=3, b = 5;printf(a[Ya!Hello! how is this? %s\n], b[junk/super]); here a is 3 so it print the after 3 characters ie.*Hello! how is this?*. and coming to b is 5 so it prints *super*. this is my guess and i cant get the other

Re: [algogeeks] MS question

2011-06-02 Thread PRITPAL SINGH
Ya!Hello! how is this? %s\n is essentially a character array 3[Ya!Hello! how is this? %s\n] yields H. 3[Ya!Hello! how is this? %s\n] yields address of character array beginning with H i.e address of array Hello! how is this? %s\n which forms the format string in printf. Thus Hello! how is this

Re: [algogeeks] MS question

2011-06-02 Thread Harshal
same as: int a[5] = { 1, 2, 3, 4, 5 }; int i = 3; printf(%d, i[a]); in question asked, a will set ptr to 3rd position ie. at H and will print whole string b will set ptr to 5th position ie. @ s it also print whole string. But in 2nd printf , string will start from 3rd position ie. T and will

Re: [algogeeks] MS question

2011-06-02 Thread shashankreddy509
ya go it. thanks for the response... -- 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/-/aVY0WGJnYUUzSllK. To post to this group, send email to

Re: [algogeeks] MS Q

2011-06-02 Thread Harshal
some test cases: 1) r is -ive 2) r is 0 3) test center in all four quadrants. 4) r is some very large number On Thu, Jun 2, 2011 at 11:47 PM, Sachin Jain sachinjain...@gmail.comwrote: Can you please tell What are we testing here ?. I mean to ask what is the output of the function.. On

Re: [algogeeks] MS question

2011-06-02 Thread Balaji S
@above : thanks got 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 algogeeks+unsubscr...@googlegroups.com. For more options,

[algogeeks] MS Question

2011-06-01 Thread Ashish Goel
given a single linked list, there is a possibility of pointer corruption, modify the data structure to ensure that the data is not lost. in my view a skip list is a good option, any other solutions? Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 --

[algogeeks] MS Iv Question

2011-06-01 Thread Ashish Goel
given an application that draws a circle ...you give center coordinates and radius, how would you test this application Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] MS Question

2011-06-01 Thread Gaurav Aggarwal
other solution might be to use doubly linked list, even if one pointer gets corrupt, there is other path to reach the destination. On Wed, Jun 1, 2011 at 1:24 PM, Ashish Goel ashg...@gmail.com wrote: given a single linked list, there is a possibility of pointer corruption, modify the data

Re: [algogeeks] MS Question

2011-06-01 Thread Kunal Patil
@Gaurav: You might want to say circular doubly linked list, didn't you ? coz without that, its not possible to reach last node if we are at first node or vice-versa. On Thu, Jun 2, 2011 at 9:31 AM, Gaurav Aggarwal 0007gau...@gmail.comwrote: other solution might be to use doubly linked list,

[algogeeks] MS interview question

2011-05-31 Thread Anand
Given a linked list of the form, 1-2-3-4-5-6, convert it into the form 2-1-4-3-6-5. Note that the nodes need to be altered and not the data contained in them -- 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] MS interview question

2011-05-31 Thread Shivaji Varma
Hi, Please take a look at this link. http://mycsinterviewsexperiences.blogspot.com/ -- Shivaji On Wed, Jun 1, 2011 at 6:26 AM, Anand anandut2...@gmail.com wrote: Given a linked list of the form, 1-2-3-4-5-6, convert it into the form 2-1-4-3-6-5. Note that the nodes need to be altered and

[algogeeks] ms ques

2011-05-27 Thread UTKARSH SRIVASTAV
test cases for internet explorer -- *UTKARSH SRIVASTAV CSE-3 B-Tech 2nd Year @MNNIT ALLAHABAD* -- 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,

Re: [algogeeks] ms ques

2011-05-27 Thread Logic King
http://samples.msdn.microsoft.com/ietestcenter/ On Fri, May 27, 2011 at 9:40 AM, radha krishnan radhakrishnance...@gmail.com wrote: Check whether this is storing Google Search Results ? ? ?? ? ? ? ? ?? [HONEY POTTING] On Fri, May 27, 2011 at 10:07 PM, UTKARSH SRIVASTAV

[algogeeks] MS Questions

2011-04-05 Thread Ashish Goel
1. Given an n-ary tree. requirement it to convert the elements in such a manner that every parent is median of its childs. 2. Given an unsorted array(with negatives and duplicates), search an element with less than 2n comparisions. 3. Modify the push and pop functions of the stack so that the max

RE: [algogeeks] MS Questions

2011-04-05 Thread Hamilton Verissimo de Oliveira
, 4, I'd go for a priority queue. Sent from my Windows Phone -- From: Ashish Goel Sent: Tuesday, April 05, 2011 3:54 AM To: Algorithm Geeks Subject: [algogeeks] MS Questions 1. Given an n-ary tree. requirement it to convert the elements in such a manner that every parent

[algogeeks] MS : Design an expensive clock for 4-7 year olds

2011-02-15 Thread Ashish Goel
the idea is to check how far the imagination can go Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

[algogeeks] MS

2010-10-16 Thread Harshal
Given a text file, implement a solution to find out if a pattern similar to wild cards can be detected. for example find if a*b*cd*, or *win or *def* exists in the text. how to take care of wild cards? -- Harshal Choudhary -- You received this message because you are subscribed to the Google

Re: [algogeeks] MS

2010-10-16 Thread Vandana Bachani
Hi Harshal, The question is a bit unclear, especially given the *win and *def* pattern. Does it mean anything before win is acceptable or anything before and after def is acceptable? or is it like 'a' repeated any number of times followed by 'b' repeated any number of times... in a*b*cd*? I am

Re: [algogeeks] MS

2010-10-16 Thread Harshal
thanks for a detailed approach to the solution. :) - Harshal -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to

[algogeeks] MS Question

2010-08-24 Thread CraZyBoY
You have an abstract computer, so just forget everything you know about computers, this one only does what I'm about to tell you it does. You can use as many variables as you need, there are no negative numbers, all numbers are integers. You do not know the size of the integers, they could be

Re: [algogeeks] MS Question

2010-08-24 Thread Mihai Donțu
On Tuesday 24 August 2010 19:14:11 CraZyBoY wrote: You have an abstract computer, so just forget everything you know about computers, this one only does what I'm about to tell you it does. You can use as many variables as you need, there are no negative numbers, all numbers are integers. You

[algogeeks] MS Question :decrement, subtract and dividewith setZero, setEqual, increaseby1 and loop macro

2010-08-24 Thread Ashish Goel
inline int decrease (int v) { int decreasedVal = 0; int counter = 0; loop( v) and { decreasedVal = counter; counter++}; return decreasedValue; } Need to think a better way for subtracting one variable from other also inline int subtract(int a, int b) { loop (b) decrease(a); } division

<    1   2   3   4   5