[algogeeks] Direct-i Onsite Round Questions

2012-04-22 Thread Algo-Geek
Hi geeks !!! I have an onsite interview of Direct-i scheduled next month. They said - " There are 2 rounds - algo round + final round ". Plzzz share the questions if any or atleast share your ideas regarding what and how to prepare for the onsite round. Thanx -- You received this message bec

[algogeeks] Direct-I second round telephonic interview

2012-04-11 Thread Algo-Geek
any info regarding the type of questions asked in 2nd telephonic round of directi. it is subjects round.basically courses taught in college. what type of questions to expect ? Any help ?? Thanx in advance. -- You received this message because you are subscribed to the Google Groups "Algorithm

[algogeeks] Re: MS QUESTION_LINKED LIST

2012-03-28 Thread Algo-Geek
using stack, the problem can be solved in O(n) time. here is the algo :- 1- push first node in stack. mark next node as current 2 - start from current element and check if the node on top of stack is smaller than current , then pop the node and make its next_largest pointer set to current. Do t

[algogeeks] Two most distant nodes

2012-03-25 Thread Algo-Geek
In the below example , two most distant nodes are ( h,k) or ( h,j ) - a- -b- - c- d - e-j k - f - g h So we have to find two nodes between whom , the distance is maximised. This boils down to finding the two nodes in the d

Re: [algogeeks] Amazon Interview Question

2012-01-19 Thread Coding Geek
@all Please check the Backtracking examples at http://www.geeksforgeeks.org/archives/tag/backtracking. You will understand the logic. In this examples first we fix a no. onto some position. After we check for other no. if any of the no. do not fit according to property we move back and reset all t

Re: [algogeeks] Amazon Interview Question

2012-01-19 Thread Coding Geek
gt;>> put(a, n); >>>> >>>> static void put(int[] a,int i){ >>>> if(i>0){ >>>> for(int j=0;j>>> if(a[j]==0 && a[j+i+1]==0){ >>>> a[j]=i; >>>> a[j+i+1]=i; >>>> put(a, i-1); >>>

[algogeeks] vertical level sum in Binary tree

2012-01-19 Thread Coding Geek
Given a binary tree with no size limitation, write a program to find the sum of each vertical level and store the result in an appropriate data structure (Note: You cannot use an array as the tree can be of any size). 4

[algogeeks] Amazon Interview Question

2012-01-18 Thread Coding Geek
Place N number from 1 to N, in 2N positions in such a way so that there are Exactly ā€œnā€ number of cells between two placed locations of number ā€œnā€. Write a program to display numbers placed in this way. Example:- (1) One of the possible placement for 7 numbers in 14 positions is : 5 7 2 3 6 2 5

[algogeeks] Re: SUGGESTIONS

2012-01-01 Thread geek forgeek
anyone ? On Sun, Jan 1, 2012 at 4:05 PM, geek forgeek wrote: > Hello Everyone , > I have finished all the standard algorithms in the one - semester > curriculum of the B-Tech course. > I want help on the kind of algorithms i should do now . > > I get difficulty in doing proble

[algogeeks] SUGGESTIONS

2012-01-01 Thread geek forgeek
Hello Everyone , I have finished all the standard algorithms in the one - semester curriculum of the B-Tech course. I want help on the kind of algorithms i should do now . I get difficulty in doing problems in competitions like on topcoder , codechef etc.So Kindly suggest links or books for the sa

[algogeeks] NUMBER OF MST ?

2011-12-03 Thread geek forgeek
If there are n nodes in a graph connected to each other with edges of same length .Then how many minimum spanning trees are possible ? -- 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

[algogeeks] What is generally asked by people having 1/2 years experience?

2011-10-05 Thread algo geek
HI, Does anyone has idea about what is asked in interviews for the people who have 1/2 year experience ? You can tell about good companies like adobe, microsoft, amazon, google. Thanks in advance -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" grou

Re: [algogeeks] First non-repeated character complexity?

2011-09-28 Thread Geek-0
But again this uses 25 integer variables (array) , what were you suggesting about setting bits for checking repeatedness?? i mean there are 256 ascii characters so that means i shall use 8 integer variables (8*4*8=256 bits) right ? if am correct then could you explain what to do next? -- You

Re: [algogeeks] First non-repeated character complexity?

2011-09-27 Thread Geek-0
Could you just explain how to implement using bitset ? -- 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/-/CckzrVcuv-kJ. To post to this group, send email to a

Re: [algogeeks] Can anyone tell amazon written questions ??? thanx in adv.

2011-09-24 Thread algo geek
anyone? On Sat, Sep 17, 2011 at 5:54 AM, Deoki Nandan wrote: > > > -- > **With Regards > Deoki Nandan Vishwakarma > > * > * > > -- > 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

Re: [algogeeks] Re: Adobe final interview question : small change

2011-09-24 Thread algo geek
actory Design pattern.. > > > :) > Prem > > > On Fri, Sep 23, 2011 at 3:02 PM, algo geek wrote: > >> You have a library provided by the vendor. All you have is header files >> and library files. >> Library contains the class Shape and there is whole hierarchy tre

[algogeeks] Re: Adobe final interview question : small change

2011-09-23 Thread algo geek
You have a library provided by the vendor. All you have is header files and library files. Library contains the class Shape and there is whole hierarchy tree (i mean classes which derive from this base class). Now you want to add some function "getArea" (not originally present in the class or any o

[algogeeks] Adobe final interview question

2011-09-23 Thread algo geek
You have a library provided by the vendor. All you have is header files and library files. Library contains the class Shape and there is whole hierarchy tree (i mean classes which derive from this base class). Now you want to add some function "getArea" (not originally present in the class or any o

Re: [algogeeks] Re: question

2011-09-22 Thread algo geek
Keep a pointer ont the rightmost digit. Keep moving right until you find the number in increasing number. As soon as this breaks. stop. Swap the digit at the current position with the smallest digit, but larger than the current position digit, sort the array to the right of the current position in

[algogeeks] Please share amazon online test questions for freshers

2011-09-08 Thread algo geek
-- 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 ht

Re: [algogeeks] Re: Winshuttle Pattern and Question *Urgent*

2011-08-27 Thread Algorithm Geek
Winshuttle Procedure : First Round : C Aptitude, Quantitative Aptitude 30 Mins Test 2nd : Coding Round 3rd : Technical Interview 4th : Technical + HR Hope it helps :) On Sat, Aug 27, 2011 at 11:38 AM, Brijesh wrote: > lol.. Tu bhi yahin pe? > yaar samsung me intern he mili hai.. final offe

Re: [algogeeks] MS interview:

2011-07-27 Thread geek forgeek
the File system tree. >> >> -- >> >> >> >> On Wed, Jul 27, 2011 at 12:06 PM, geek forgeek wrote: >> >>> Function to display the directory structure in a user friendly way taking >>> root dir as arg >>> for a general OS. You may assume a

[algogeeks] Re: MS interview:

2011-07-26 Thread geek forgeek
anyone?? On Tue, Jul 26, 2011 at 11:36 PM, geek forgeek wrote: > Function to display the directory structure in a user friendly way taking > root dir as arg > for a general OS. You may assume and state some basic APIs available in > that OS > -- You received this message

[algogeeks] MS interview:

2011-07-26 Thread geek forgeek
Function to display the directory structure in a user friendly way taking root dir as arg for a general OS. You may assume and state some basic APIs available in that OS -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, s

Re: [algogeeks] OUTPUT

2011-07-25 Thread geek forgeek
use of side effect? * > * * > * > * > *Muthuraj R. > 4TH Year BE.** > Information Science Dept* > *PESIT, Bengaluru . > * > > > > > > On Mon, Jul 25, 2011 at 10:49 PM, Deoki Nandan wrote: > >> run on gcc compiler it would be >> 0 >> 1 1 >> >

Re: [algogeeks] OUTPUT

2011-07-25 Thread geek forgeek
ma mistake code is #include main() { int i=1; printf("\n%d %d",i^=1%2,i<<=1%2); return 0; } On Mon, Jul 25, 2011 at 10:19 AM, Deoki Nandan wrote: > run on gcc compiler it would be > 0 > 1 1 > > On Mon, Jul 25, 2011 at 10:35 PM, geek forgeek wrote: > >>

[algogeeks] OUTPUT

2011-07-25 Thread geek forgeek
1. #include main() { int i=1; printf("\n%d",i^=1%2); printf("\n%d %d",i^=1%2,i<<=1%2); return 0; } output 3 3 hey shudnt the output be 3 2 -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googleg

[algogeeks] output plzz

2011-07-23 Thread geek forgeek
#include main() { char outline[50]; char one[7],two[7],four[7],five[7]; int three; sprintf(outline,"this is %d times %s \n",10,"charlie"); printf("%s",outline); sscanf(outline,"%s %s %d %s %s",&one,&two,&three,&four,&five); printf("%s",one); printf("%s",two); pri

Re: [algogeeks] output plzz

2011-07-23 Thread geek forgeek
ter idea to start a >>> parallel group especially for the same?My request to the group admins for >>> the same. >>> >>> >>> On Sat, Jul 23, 2011 at 8:47 PM, geek forgeek wrote: >>> >>>> #include >>>> main() >>>>

[algogeeks] output plzz

2011-07-23 Thread geek forgeek
#include main() { int i=3; switch(i) { do { case 3: printf("\nhello"); case 2:printf("\n h"); break; case 1:printf("wat"); break; case 0: printf("hai"); }while(i--); }

Re: [algogeeks] Re: C OUTPUT HELP

2011-07-22 Thread geek forgeek
@nicks -- ur code for 1st problem is giving me 1 not -1 on gcc..which compiler are you using On Fri, Jul 22, 2011 at 11:58 AM, sumit wrote: > +1 to t3rminal > > > On Jun 12, 11:38 pm, T3rminal wrote: > > @all > > Stop guessing and making your own standards. C standards haven't > > defined anyth

[algogeeks] xplain output

2011-07-22 Thread geek forgeek
#include void main() { int x; float t; scanf("%f",&t); printf("%f\n",t); x=90; printf("%f\n",x); { x=1; printf("%f\n",x); { x=30; printf("%f\n",x); } printf("%f\n",x); } x==9; printf("%f\

Re: [algogeeks] explain plzz:output in file old.out

2011-07-22 Thread geek forgeek
inating condition is for EOF, which is -1( scanf >>> returns -1 ) at the end. >>> >>> >>> On Fri, Jul 22, 2011 at 11:34 PM, shady wrote: >>> >>>> well you didn't mention the question, directly posted the code with no >>>> he

Re: [algogeeks] explain plzz:output in file old.out

2011-07-22 Thread geek forgeek
@shady this is nt a joke.. sorry if i am asking too stupid question i m getting an infinite loop here. not getting how? On Fri, Jul 22, 2011 at 10:40 AM, shady wrote: > what kind of joke is this ? > > On Fri, Jul 22, 2011 at 11:02 PM, geek forgeek wrote: > >> #include >>

[algogeeks] explain plzz:output in file old.out

2011-07-22 Thread geek forgeek
#include main() { FILE *fp; char a; fp=fopen("old.out","w"); if(fp==0) printf("File opening error"); else { for(scanf("%c",&a);a!=EOF;scanf("%c",&a)) fprintf(fp,"%c",a); fclose(fp); fp=fopen("old.out","r"); while(!feof(fp))

Re: [algogeeks] Re: EXPLAIN THE OUTPUTS

2011-07-19 Thread geek forgeek
@schrodinger y a[] value is not lost in first call.it should be lost in first call only? On Tue, Jul 19, 2011 at 8:24 PM, schrodinger <6fae1ce6347...@gmail.com>wrote: > First output of memory location is fine. > Second output is also expected one. > Third output will vary compiler to compiler an

[algogeeks] OUTPUT

2011-07-18 Thread geek forgeek
int main() { static int var = 5; printf("%d ",var--); if(var) main(); } y output is 5 4 3 2 1 not 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 y on each recursive call var is not initialized again. -- You received this message because you are subscribed

Re: [algogeeks] MICROSOFT

2011-07-17 Thread geek forgeek
ing things > c[n-1]=1; > c[i]=c[i+1]*a[i+1] (i>n-1) > fill the c[] array in reverse order i.e. start from n-1 then go to 0; > > now output[] would be > output[i]=b[i]*c[i]; > > > > > On Sun, Jul 17, 2011 at 4:28 PM, geek forgeek wrote: > >> given an

[algogeeks] MICROSOFT

2011-07-17 Thread geek forgeek
given an array a[0..n-1] .required to find the output array out [0.n-1] such that out [i] is the product of all the numbers a[0] to a[n-1] excluding a[i] for ex out[2]=a[0]*a[1]*a[3]*a[4]a[n-1] constraint is not using division operator how to do this in O(n)?? -- You received th

[algogeeks] c doubt

2011-07-11 Thread geek forgeek
#include main(){int a=10,b; a>=5?b=10:b=20;printf ("%d\n",b);} y this is asking for lvalue while this(below) not? #include main(){int a=10,b; a>=5?b=10:(b=20);printf

Re: [algogeeks] Re: segment tree

2011-07-04 Thread geek forgeek
amp;d1=tutorials&d2=lowestCommonAncestor > > On Jul 4, 5:15 pm, geek forgeek wrote: > > any1 > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googl

[algogeeks] Re: segment tree

2011-07-04 Thread geek forgeek
any1 -- 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

[algogeeks] segment tree

2011-07-04 Thread geek forgeek
-- Forwarded message -- From: geek forgeek Date: Mon, Jul 4, 2011 at 2:58 PM Subject: segment tree To: algog...@googlegroups.com can any1 plz tell some gud tutorial for segment tree? -- You received this message because you are subscribed to the Google Groups "Algorithm

[algogeeks] Dynamic prog.

2010-11-20 Thread GEEK
given an expression of n numbers separated by " * " and " + " operators but the order of operations is not clear as the parenthesis have been removed. how will i get the maximum result for this expression. -- You received this message because you are subscribed to the Google Groups "Algorithm G

[algogeeks] Dynamic programming

2010-11-20 Thread GEEK
Given an expression involving n numbers and n-1 operators (multiplication and addition) how do you solve this in order to get maximum value? There are no parenthesis in the equation and all numbers are positive. -- You received this message because you are subscribed to the Google Groups "Algori

[algogeeks] knight moves in chess

2010-08-24 Thread Algo geek
find the minimum no of moves by which a KNIGHT reaches the destination from source in a 8x8 chess borad... **you will be given the starting position and ending position .. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group