Re: [algogeeks] Cisco paper questions

2012-08-12 Thread Abhishek Kumar
smbody plz post cisco written Qs

On Thu, Aug 9, 2012 at 12:29 PM, Abhi  wrote:

> Hi Guys,I have Cisco & Goldman Sachs placement exams next week.
> If anyone has appeared for cisco or Goldman Sachs recentlyplz post
> some of the questions asked by them.
> It would really be of great help for me.
> Thanks
>
> --
> 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/-/1DO6JiTEQnQJ.
> 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 group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] google paper

2012-08-12 Thread Abhishek Kumar
one Q is zig zag traversal in a tree nd d other one is like - A new
language is defined called "googley " and it has two register only 'X' and
'Y'  and only two commands are avialable "next" and  "print" each one has
some specific function (i don't remember now) and now u are given a string
and u hav to write a series of these commands for d given string lyk for
"CBC" o/p is "next next next print".

hope this will give u some idea..


On Sat, Aug 11, 2012 at 2:39 PM, ~*~VICKY~*~ wrote:

> Can you share the coding questions asked. Thank you.
>
>
> On Fri, Aug 10, 2012 at 10:29 PM, Abhishek Kumar wrote:
>
>> two coding Qs + some mcqs(more than 1 option correct),time is 1.5 hr..
>>
>>
>> On Fri, Aug 10, 2012 at 4:06 PM, deepikaanand wrote:
>>
>>> Somebody from DCE plz tell the paper pattern of google...
>>>
>>> --
>>> 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/-/BjLRVjRlekIJ.
>>> 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 group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> 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 group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> Cheers,
>
>   Vicky
>
>  --
> 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 group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] google paper

2012-08-11 Thread Abhishek Kumar
two coding Qs + some mcqs(more than 1 option correct),time is 1.5 hr..

On Fri, Aug 10, 2012 at 4:06 PM, deepikaanand wrote:

> Somebody from DCE plz tell the paper pattern of google...
>
> --
> 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/-/BjLRVjRlekIJ.
> 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 group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: find a point closest to other points

2012-05-06 Thread abhishek kumar
Not Necessary but for some case only

On Tue, May 1, 2012 at 8:44 PM, Bhupendra Dubey wrote:

> Find the centroid
>
> X= (x1 +x2xn)/N
> Y=(y1+y2..yn)/N
> This will precisely be the point no need to calculate and check with
> distance.
>
>
> On Tue, May 1, 2012 at 1:18 PM, mohit mishra wrote:
>
>> Let me know if there is any bug
>> /*using centroid of plane */
>>
>> struct point
>> {
>> int x;
>> int y;
>> };
>> typedef struct point Point;
>> int main()
>> {
>> int n,i;
>> int d,dis;
>> float sum_x=0,sum_y=0;
>> Point centroid,final;
>> //clrcsr();
>> printf("how many points?  ");
>> scanf("%d",&n);
>> Point p[100];
>> printf("enter X and Y cordinates of %d points\n",n);
>> for(i=0;i> scanf("%d%d",&p[i].x,&p[i].y);
>> for(i=0;i> {
>> sum_x=sum_x+p[i].x;
>> sum_y=sum_y+p[i].y;
>> }
>>centroid.x=(int)sum_x/n;
>>centroid.y=(int)sum_y/n;
>> for(i=0;i> {
>> dis=distance(centroid,p[i]);
>> if(dis> {
>>  d=dis;
>>  final.x=p[i].x;
>>  final.y=p[i].y;
>>
>>  }
>> }
>> printf("\n The point is (%3d  ,%3d)",final.x,final.y);
>> getch();
>> return 0;
>> }
>> int distance(Point A,Point B)
>> {
>> int x,y;
>> x=(A.x-B.x)*(A.x-B.x);
>> y=(A.y-B.y)*(A.y-B.y);
>> return sqrt(x+y);
>> }
>>
>>
>> On Mon, Apr 30, 2012 at 4:34 PM, kosgi santosh wrote:
>>
>>> how can we find centriod of n points in a plane?
>>>
>>>
>>>
>>>
>>>
>>> Regards,
>>> Santosh K.
>>>
>>> --
>>> 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 group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>>
>>  --
>> 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 group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> bhupendra dubey
>
> --
> 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 group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Abhishek Kumar
B.Tech(IT) Graduate
Allahabad
Contact no-+919663082731

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Any one

2011-11-23 Thread abhishek kumar
You are given a word and a dictionary. Now propose an algorithm edit
the word (insert / delete characters) minimally to get a word that
also exists in the dictionary. Cost of insertion and deletion is same.
Write pseudocode for it.

Seems like minimum edit distance problem but some modification is
needed.


-- 
Abhishek Kumar
B.Tech(IT) Graduate
Allahabad
Contact no-+919663082731

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] LCA of a Binary tree not a binary search tree

2011-11-22 Thread abhishek kumar
If you maintain the parent, it'll be a simple problem.
Just go to the two nodes and then trace their parents till you reach the
common node.

On Tue, Nov 22, 2011 at 1:59 PM, anshu mishra wrote:

> first try to understand the sol then comment. it is for binary tree not
> for BST.
>
> On Mon, Nov 21, 2011 at 10:25 PM, Piyush Grover  > wrote:
>
>> For BST it would be rather simpler. find the first node which lies in
>> between the two.
>>
>> On Wed, Nov 16, 2011 at 1:44 PM, anshu mishra 
>> wrote:
>>
>>> Node *LCA(node *root, node *e1, node *e2, int &x)
>>>
>>> {
>>>
>>> Node *temp =NULL;
>>>
>>> Int y = 0;
>>>
>>> If (root->left) temp = LCA(root->left, e1, e2, y);
>>>
>>> x+=y;
>>>
>>> if (temp) return temp;
>>>
>>>if (x==2) return node;
>>>
>>> y = 0;
>>>
>>> If (root->right) temp = LCA(root->right, e1, e2, y);
>>>
>>> x+=y;
>>>
>>> if (temp) return temp;
>>>
>>> if (x==2) return node;
>>>
>>> If (root == e1 || root == e2) x++;
>>>
>>> Return null;
>>>
>>> }
>>>
>>> --
>>> 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 group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> 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 group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> Anshuman Mishra | Software Development Engineer | Amazon
>
>
>  --
> 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 group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
*Abhishek*

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Problem

2011-10-31 Thread abhishek kumar
Represent the dependencies as a graph. Store all the values in a list. For
each vertex in the graph find all values for which there is no edge from
the vertex. If these values are there in the list, remove them from the
list and create a set of the vertex and the removed values.
If the values are not there in the list then create a set with the vertex
only. Do this for all the vertices.

On Mon, Oct 31, 2011 at 5:51 PM, Bharath 2009503507 CSE <
bharathgo...@gmail.com> wrote:

> Given a set of values..in which there are some dependencies..
>
> Eg..  x y z a b
>
> Dependencies: x,y
> a,z
>
> Note that dependency is not transitive..Is it possible to separate
> these elements into sets such that no two elements in the same set are
> dependant and we should end up with the least number of sets..
>
> I could not find a good solution for this..Please help me..
>
> Regards,
>
> Bharathwajan
>
> --
> 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 group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Samsung India electronics pvt. ltd

2011-08-04 Thread abhishek kumar
i have appeared for Samsung. so here i am giving some idea. 
written section
first round: All reasoning question were based on puzzles like sitting 
arrangement(little bit tough). -25 que and 20on DI rest 5 on simple apti.
second round: (for c/c++) 30 ques were asked for 30 mins. 20 questions was 
on c/c++, 90% on pointers(little bit triky),. 5 OS(simple), 5 DS(simple).
cut off will be very high. so get prepared for speed.

-- 
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/-/a_PApN1YJeIJ.
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Pointers

2011-08-04 Thread abhishek kumar
i think for 
pointers:- yashwant kanetkar(Understanding pointers in C) will be good 
enough.
Queues, Stacks: Tanenbaum(Data Structures through C/C++) 

-- 
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/-/B464lUDHmasJ.
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Aricent is coming..

2011-08-03 Thread abhishek kumar
thanks..

-- 
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/-/HvrvfCYJUsEJ.
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Aricent is coming..

2011-08-03 Thread abhishek kumar
hey guys..
Aricent is visiting to our college on 22nd. will you provide me the pattern 
and sample papers..
thanks in advance.

-- 
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/-/aE5SSBY4lcwJ.
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Directi on campus

2011-08-03 Thread abhishek kumar
@aditi: i didn't got, what you said..

-- 
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/-/acgqxPRHBAMJ.
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Directi on campus

2011-08-03 Thread abhishek kumar
mostly on Linux(deep concepts), puzzles, simple data structures. around 50 
questions will be there in first round of written..

-- 
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/-/Hyy5Gb2UPK0J.
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] C output

2011-07-14 Thread abhishek kumar
@Sandeep Jain

sandeep, please be more clear about lvalue & rvalue assignment.

-- 
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/-/42bIvZNRPRYJ.
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] C output

2011-07-14 Thread abhishek kumar
@Gaurav Jain

but in Turbo C++ (as a c++ program)
it is giving output a=36.

-- 
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/-/ORNJxARkBIoJ.
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] C output

2011-07-14 Thread abhishek kumar
@Gaurav Jain

in turbo c++,(this was a c program).

it is giving output 36.

-- 
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/-/uuO64oNqACMJ.
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] C output

2011-07-13 Thread abhishek kumar
hi friends,
i have a doubt about this code. what will be its output and how.

int a=35,*b;
b=&a;
++*b=++*b;


-- 
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/-/IfTO9YhPSOUJ.
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Yahoo coding round question

2010-10-19 Thread Abhishek Kumar Singh
Given an array of length N. How will you find the minimum length
contiguous sub - array of whose sum is S and whose product is P . Here
S and P will be given to you.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] How will you find the subarray whose product is k in an array of negative and positive numbers

2010-09-30 Thread Abhishek Kumar Singh
How will you find the subarray whose product is k in an array of
negative and positive numbers

efficient algorithm is to be considered, it will be better if time
complexity is O(n)

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Amazon: sort array

2010-07-11 Thread Abhishek Kumar Singh

Is not ur code is running in o(n^2) complexity 
You have used two while loop ...
plzz eleborate if i m wrong .

On Jul 12, 11:00 am, Amit Mittal  wrote:
> I think this will work.
>
> # include "stdio.h"
>
> void my_print(int *,int);
> void swap(int &a , int&b)
> {
>  a = a + b;
>  b = a - b;
>  a = a - b;}
>
> void sort(int* array, int SIZE, int i, int j)
> {
>         while(i         {
>                 my_print(array,SIZE);
>                 if(array[i] <= array[j])
>                         i++;
>                 if(array[j] < array[i])
>                 {
>                         swap(array[i] , array[j]);
>                         i++;
>                         int temp = j;
>                         while(temp< (SIZE-1) && (array[temp] > array[temp+1]) 
> )
>                         {
>                             swap(array[temp] , array[temp + 1]);
>                              temp++;
>                         }
>                 }
>         }
>
> }
>
> void my_print(int * array, int SIZE)
> {
>         printf("\n");
>         int i = 0;
>         for(; i < SIZE ; i++)
>                 printf("%d, ",array[i]);
>         printf("\n");}
>
> int main()
> {
>         int array1[8] = {1,3,6,7,4,5,6,8};
>         int array2[10] = {1,2,3,5,6,7,4,8,9,10};
>         int array3[10] = {10,20,30,40,50,23,27,40};
>
>         //sort(array1,8,0,4);
>         //sort(array2,10,0,6);
>         sort(array3,8,0,5);
>         //my_print(array1,8);
>         //my_print(array2,10);
>         my_print(array3,8);
>         return 0;
>
> }
>
> On Mon, Jul 12, 2010 at 10:20 AM, Abhishek Kumar Singh <
>
>
>
> iiita2007...@gmail.com> wrote:
> > @souravsain
>
> > for input {10,20,30,40,50,23,27};
> > ur output is coming  10, 20, 23, 27, 40, 30, 50,
> > which not SORTED array.
>
> > On Jul 10, 6:19 pm, souravsain  wrote:
> > > @Jitendra
>
> > > I have run the code with input given by you and found that it works
> > > well.
>
> > > Please have a look athttp://codepad.org/iMBTwAL7
>
> > > Appriciate the effort taken by you to analyze the solution and do let
> > > me know if you still do not agree with the code.
>
> > > Regards,
> > > Sourav
>
> > > On Jul 8, 9:03 pm, Jitendra Kushwaha  wrote:
>
> > > > @souravsain
> > > > Consider your algo for the case
> > > > int arr[] = {10,20,30,40,50,23,27};
>
> > > > everytime when you increment the j you are missing on element i.e j-1
> > for
> > > > further comparison
>
> > > > --
> > > > Regards
> > > > Jitendra Kushwaha
> > > > 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 algoge...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > algogeeks+unsubscr...@googlegroups.com > .com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/algogeeks?hl=en.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Amazon: sort array

2010-07-11 Thread Abhishek Kumar Singh
@souravsain

for input {10,20,30,40,50,23,27};
ur output is coming  10, 20, 23, 27, 40, 30, 50,
which not SORTED array.

On Jul 10, 6:19 pm, souravsain  wrote:
> @Jitendra
>
> I have run the code with input given by you and found that it works
> well.
>
> Please have a look athttp://codepad.org/iMBTwAL7
>
> Appriciate the effort taken by you to analyze the solution and do let
> me know if you still do not agree with the code.
>
> Regards,
> Sourav
>
> On Jul 8, 9:03 pm, Jitendra Kushwaha  wrote:
>
>
>
> > @souravsain
> > Consider your algo for the case
> > int arr[] = {10,20,30,40,50,23,27};
>
> > everytime when you increment the j you are missing on element i.e j-1 for
> > further comparison
>
> > --
> > Regards
> > Jitendra Kushwaha
> > 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 algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.