Re: [algogeeks] C o/p help

2012-01-26 Thread rahul sharma
@ atul...got nw..thnx On Thu, Jan 26, 2012 at 11:26 PM, atul anand wrote: > think in terms of pointers... > > they are same :- > > p[-1] = *(p - 1) > > > On Thu, Jan 26, 2012 at 11:15 PM, rahul sharma wrote: > >> [-1] in end is same as -1 ?? >> >&

Re: [algogeeks] C o/p help

2012-01-26 Thread rahul sharma
gt; p=p-1; >> >> i.e p will point to *argv[1] >> >> hence output will be >> o/p = cd >> >> On Thu, Jan 26, 2012 at 10:53 PM, rahul sharma >> wrote: >> >>> #include >>> #include >>> void fun(char **); >>> >&g

[algogeeks] C o/p help

2012-01-26 Thread rahul sharma
#include #include void fun(char **); int main() { char *argv[]={"ab","cd","de","fg"}; fun(argv); getch(); return 0; } void fun(char **p) { char *t; t=(p+=sizeof(int))[-1]; printf("%s\n",t); } o/p: fg can nyone xplain the 2nd statement in fun? -- You receive

Re: [algogeeks] OS question

2012-01-25 Thread Rahul
Google search this 6.033 You will get the basics of processor mode of execution and rings of execution Hope I got the question ! On Wed, Jan 25, 2012 at 4:21 PM, UTKARSH SRIVASTAV wrote: > I have a doubt when each process has it's own separate page table then why > is there s system wide page tabl

Re: [algogeeks] anybody c output?

2012-01-24 Thread rahul sharma
cant get the o/p...is the replacement of (char *)p create local copy of p or gloabl p will be typecatsted.nhyone plz xplain... On Sun, Jan 22, 2012 at 11:10 PM, him wrote: > http://ideone.com/hOdAt > > code: > > > #include > char *p = "Hello World"; > > #define PTR (char *) > char a[10]

Re: [algogeeks] Amazon Interview Question

2012-01-19 Thread rahul patil
isit 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

Re: [algogeeks] C QUESTION???

2012-01-10 Thread Rahul Verma
thanks for the info -- 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/-/E1c87OjP6LAJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubs

Re: [algogeeks] c output ??

2012-01-10 Thread Rahul Verma
@amol this is not the behaviour of printf, its totally about the typecasting -- 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/-/GPVlt15S3V0J. To post to this g

Re: [algogeeks] Re: String passing

2012-01-04 Thread rahul patil
D ENGINEERING >> NIT 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 grou

Re: [algogeeks] C output????

2012-01-03 Thread Rahul
it's near to a common mis conception that string liberals are in data sections of THE PROGRAM PLEASE READ THE FILE a.out.h and find the difference between initialized data and non initialized data On 9/6/11, Sandy wrote: > String constants (literals) are saved into the .data section of the pro

Re: [algogeeks] Re: check Similar array

2012-01-03 Thread rahul patil
@samm: Rather than adding numbers could we add squares(or cube) of numbers which could also be done in linear time? On Wed, Jan 4, 2012 at 10:56 AM, rahul patil wrote: > @samm: Ur solution is great. It could be used to tell that arrays are not > similar, in linear time. But cant tell tha

Re: [algogeeks] Re: check Similar array

2012-01-03 Thread rahul patil
oup, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- Regards, Rahul Patil -- You received this message because you are subscribed to the Google Groups "Algorithm G

Re: [algogeeks] Facebook Question

2011-12-21 Thread rahul
@harish What if all the points are in the same quadrant and and are equidistant from 0,0. -- 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/-/NjysUthIqgYJ. To

[algogeeks] Re: Reverse n-Ary Tree and Return List of Leaf Nodes as Output - FYI Google MV

2011-12-21 Thread rahul
How abt representing the tree as a graph. If you represent it in adjacency mattix or as a map of edges e.g. Edge{from}{to}=edge weight, which could be a constant in this case. all you need to is to reverse the pairs. Order of complexity is o(e) and you can reach to leaf nodes and push them in a li

[algogeeks] Re: Reverse n-Ary Tree and Return List of Leaf Nodes as Output - FYI Google MV

2011-12-20 Thread rahul
How do you represent the N-ary tree? If you represent child nodes as a list, reversing this child node list at each node will solve the problem right? I may be wrong. On Dec 20, 10:50 am, atul anand wrote: > @ankur : for the given tree above instead of parent pointing to its child , > it would be

Re: [algogeeks] Any book suggestion for Data structure and algo.

2011-12-17 Thread Rahul
If you have time then Do a Google this www.algo-class.org On Sat, Dec 17, 2011 at 3:13 PM, Abhishek Goswami wrote: > Cool Rahul > > > On Sat, Dec 17, 2011 at 3:09 PM, Rahul wrote: > >> Google this >> 6.046 >> >> You should not ask any more suggestio

Re: [algogeeks] Any book suggestion for Data structure and algo.

2011-12-17 Thread Rahul
Google this 6.046 You should not ask any more suggestion till you complete the above On Sat, Dec 17, 2011 at 3:07 PM, Abhishek Goswami wrote: > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to alg

Re: [algogeeks] MYSIS AND DRISHTI-SOFT

2011-12-13 Thread rahul sharma
On Tue, Dec 13, 2011 at 3:21 PM, hary rathor wrote: > aal puzzle from techinterview. more then 50 % came from there . > > -- > 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. >

Re: [algogeeks] Detect a loop with just head ptr given

2011-12-11 Thread rahul sharma
for linked we always have only head On Thu, Dec 8, 2011 at 11:40 PM, sayan nayak wrote: > @Himanshu: If I follow ur algo..then I have to remove the loop..Otherwise > there will not be any head for the reversed linked-list. > If u wanna say..First remove the loop,make it a normal linked list,reve

Re: [algogeeks] MYSIS AND DRISHTI-SOFT

2011-12-10 Thread rahul sharma
@aayush...this group is dedicated to algorithmthere is a separate group for thesei dnt knw y still these queries are allowed On Sat, Dec 10, 2011 at 10:58 PM, Anika Jain wrote: > drishti latest test: > 1st round written : 25 questions technical( 12 from c, 6 from java, 7 from > os), 25 q

[algogeeks] finding duplicate set of paranthesis

2011-12-10 Thread rahul venkat
hi everyone, can u suggest an algorithm for finding the duplicate paranthesis in a given expression ? for example , the expression (( a + b ) * (( c + d ))) has a set of duplicate paranthesis. thanks in advance . -- You received this message because you are subscribed to the Google Groups "Al

Re: [algogeeks] Permutation Problem with repeating characters

2011-12-07 Thread Rahul
http://www.youtube.com/watch?v=NdF1QDTRkck&list=PLFE6E58F856038C69&index=10&feature=plpp_video Watch and formulate yourself #9 #10 #11 On Wed, Dec 7, 2011 at 6:31 PM, Aniket wrote: > Write a programme to produce all permutations of a given string where > characters are not unique. That means y

Re: [algogeeks] Thanks To aLgOgEeKs

2011-12-02 Thread rahul sharma
plz post how you prepared for MS..like the books or websites you followedwould b of gr8 help. On Fri, Dec 2, 2011 at 9:42 PM, rahul sharma wrote: > gr8...congrats dude > > > On Fri, Dec 2, 2011 at 9:05 PM, Karthikeyan V.B wrote: > >> Congratulations:) >>

Re: [algogeeks] Thanks To aLgOgEeKs

2011-12-02 Thread rahul sharma
gr8...congrats dude On Fri, Dec 2, 2011 at 9:05 PM, Karthikeyan V.B wrote: > Congratulations:) > > -- > 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 th

Re: [algogeeks] Link list Q

2011-12-01 Thread rahul vatsa
detects the loop in singly linked list. On Thu, Dec 1, 2011 at 1:42 PM, Vijay Khandar wrote: > What does the following program do on the singly linked list? > > p=head; > q=head->next; > while(p!=null && q!null) > { > if(p==q) > { > exit(0) > } > p=p->next; > q=(q->next)?(q->next->next):q->next;

Re: [algogeeks] One small doubt??

2011-11-27 Thread rahul sharma
plz dnt post these type of questions . On Sun, Nov 27, 2011 at 11:40 AM, kumar raja wrote: > So does list can be a linked list or similar data structure , right?? > > > On 27 November 2011 11:17, saurabh singh wrote: > >> ans 1) Array is a *contigous elements.*The elements of a list need not

[algogeeks] structure padding query

2011-11-24 Thread rahul sharma
struct abc { int g; float f; double gj; }; like in this int takes 4 bytes and we want align in 8 bytes so i wana know that whether the float should put with int as 4 bytes are there to complete 8 or float should be int+4 bytes padding and then store the float.. acc to o/p float is st

Re: [algogeeks] Xor Linked lists

2011-11-24 Thread rahul sharma
go to link i said..n at bottom u can find sum programs that are user responshop it helps On Thu, Nov 24, 2011 at 8:45 PM, kumar raja wrote: > @rahul: > > when i tried the following i got an error > > int a=3,b=2; > > printf("%p", (&a)^(&b)); > &

Re: [algogeeks] Xor Linked lists

2011-11-24 Thread rahul sharma
address can be xored easily with xor operator... http://www.geeksforgeeks.org/archives/12367 On Thu, Nov 24, 2011 at 7:37 PM, kumar raja wrote: > > http://en.wikipedia.org/wiki/XOR_linked_list > > In this link i have seen about Xor linked list ,but my doubt is how will u > perform xor on Address

Re: [algogeeks] Silly question

2011-11-20 Thread rahul sharma
u just solve as many problems as u can...everybody has same knowledge...just solve more and more and u will be gud and dnt look at answer frst try urself ..no matter hw many minute and hours it take.it happens wen we have a sol we jsut read it and dnt solve it by ourselfso solve urself

Re: [algogeeks] function overloading query

2011-11-20 Thread rahul vatsa
yes, it will work. On Sun, Nov 20, 2011 at 9:12 PM, Akash Coder wrote: > no it wont work ... const is not a datatype. its a qualifier > > > On Sun, Nov 20, 2011 at 7:49 PM, rahul sharma wrote: > >> void fun(char *) >> void fun(const char *) >> >> >&

[algogeeks] function overloading query

2011-11-20 Thread rahul sharma
void fun(char *) void fun(const char *) is this overloading works or these are same type of arguments?? -- 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 fro

[algogeeks] regarding start of loop in linked list

2011-11-19 Thread rahul sharma
when a loop is found then slow=fast //pointers; then to find start we move one of any pointer at start and other at same palce and move both @ speed of 1...then where they meet is startr,,, can nyone xplain the logic behind this in simple words that how they meet at startthnx in advance -

Re: [algogeeks] Re: Computer Organisation Q

2011-11-18 Thread rahul sharma
not all...i have read it somehwr... On Fri, Nov 18, 2011 at 2:33 PM, Vijay Khandar wrote: > but why? > > On Nov 18, 9:14 am, "((** VICKY **))" wrote: > > False not necessarily. > > > > On Nov 17, 4:03 pm, Vijay Khandar wrote: > > > > > Can anyone explain following sentence-> True or False and e

[algogeeks] deep vs shallow copy

2011-11-17 Thread rahul sharma
plz give me xample of these two .as per from book m not able to get thesw clearly,...i have reda from wiki and got it but cant relate with these...plz differ b/w these two with xample..thnx in advance a shallow copy of an object copies all the member field values.this works well if the fields

Re: [algogeeks] Weird Behaviour of Fork()

2011-11-10 Thread rahul vatsa
you want to say is that when '\n' is not there in print > command and then it is stored in stdout buffer unless it receives a '\n' > and executes only in the end if '\n' is not received. > > thanks rahul :) > > > On Fri, Nov 11, 2011 at 12:31 PM, ra

Re: [algogeeks] Weird Behaviour of Fork()

2011-11-10 Thread rahul vatsa
ecutes only in the end if '\n' is not received. > > thanks rahul :) > > > On Fri, Nov 11, 2011 at 12:31 PM, rahul vatsa wrote: > >> u have a new line in 2nd prog bt not in the st, that makes the difference. >> when u do fork in 1st code, the "algo" is n

Re: [algogeeks] Weird Behaviour of Fork()

2011-11-10 Thread rahul vatsa
u have a new line in 2nd prog bt not in the st, that makes the difference. when u do fork in 1st code, the "algo" is nt printed on the terminal, rather it is in the stdout buffer oly, which gets duplicated in the forked pr also. nd wen the prog terminates, whtver is ther in the buffer gets printed

Re: [algogeeks] Facebook Online Question India

2011-11-09 Thread rahul sharma
facebook visit DCE???wats package??? On Wed, Nov 9, 2011 at 9:22 PM, Decipher wrote: > This question was asked by Facebook during their 2 hour online exam (Only > 1 question in 2 hour as per my junior) in DCE. > > Given a list of words wordlist on 1st line (no of words <= 100) and a > string qst

Re: [algogeeks] what will be the focus of yahoo in written exam ,what to study for it. please respond ASAP..

2011-11-09 Thread rahul sharma
i also want to knw...somebody who has faced yahoo this year plz post. On Wed, Nov 9, 2011 at 11:50 PM, kumar raja wrote: > > > -- > Regards > Kumar Raja > M.Tech(SIT) > IIT Kharagpur, > 10it60...@iitkgp.ac.in > > > -- > You received this message because you are subscribed to the Google Groups >

Re: [algogeeks] Does anyone know the written pattern of Amazon??

2011-11-09 Thread rahul patil
d b('a'not matched) After my answer Then he asked me to think about approach and use of datastructure which I can use so that i can easily add new operator like '-' '*' etc. 2> Store a binary tree into file and again reading file create it. Your approach and a dat

Re: [algogeeks] Does anyone know the written pattern of Amazon??

2011-11-09 Thread rahul sharma
hey in our college this is the procedure for internship...n ppo is ther based on profromance On Tue, Nov 8, 2011 at 10:03 PM, kumar raja wrote: > Thanks rahul > > > On 8 November 2011 03:32, rahul sharma wrote: > >> apti + technical + 3 prog (mainly linked list) >>

Re: [algogeeks] Does anyone know the written pattern of Amazon??

2011-11-08 Thread rahul sharma
apti + technical + 3 prog (mainly linked list) On Tue, Nov 8, 2011 at 3:09 PM, kumar raja wrote: > > > -- > Regards > Kumar Raja > M.Tech(SIT) > IIT Kharagpur, > 10it60...@iitkgp.ac.in > > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group

[algogeeks] program to convert roman to integer.........

2011-11-06 Thread rahul sharma
i.p: v o/p 5 i/p ix o/p:9 -- 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

Re: [algogeeks] c output

2011-10-29 Thread rahul sharma
does y goes to d of %*d and it print 5???i hav a doubt On Fri, Oct 28, 2011 at 9:32 PM, amrit harry wrote: > let this statement int x=100,y=5;printf("%*d",x,y); > in this line first x is assign to '*' and it become "%100d" > and it will padd 100 spaces before print. and if we use( "%*d",x) > then

Re: [algogeeks] Search an element in an Infinite array

2011-10-25 Thread rahul sharma
@sharmila...wat r u saying??cant get u? On Tue, Oct 25, 2011 at 4:57 PM, sharmila saru wrote: > > > Give Idea 2 study for GATE... > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@

Re: [algogeeks] Search an element in an Infinite array

2011-10-25 Thread rahul sharma
>> { >>>>> lb = ub; >>>>> ub = (ub*k) / a[ub]; >>>>> } >>>>> >>>>> after end of this loop we'll have a lower bound and upper which should >>>>> provide a narrow scope. >>>>>

Re: [algogeeks] Search an element in an Infinite array

2011-10-24 Thread rahul sharma
+1 ankur On Mon, Oct 24, 2011 at 1:26 AM, Ankur Garg wrote: > Use Binary Search > > start = 2^n-1 high =2^n where n=0,1 > > On Mon, Oct 24, 2011 at 12:28 AM, sunny agrawal > wrote: > >> hint 1: try to find 2 indexes i, j such that a[i] <= K <= a[j] >> >> >> On Sun, Oct 23, 2011 at 11:23 PM,

Re: [algogeeks] Re: Code it...

2011-10-19 Thread Rahul
http://www.dgp.toronto.edu/~ajr/209/notes/memoryos.html Rahul On Wed, Oct 19, 2011 at 2:29 PM, Rahul wrote: > http://valgrind.org/ > > I am not sure but this may help on linux. > I have a question that how to determine the number of system calls a > program has made ?

Re: [algogeeks] Re: Code it...

2011-10-19 Thread Rahul
http://valgrind.org/ I am not sure but this may help on linux. I have a question that how to determine the number of system calls a program has made ? That too of a particular type Rahul On Wed, Oct 19, 2011 at 11:07 AM, kumar raja wrote: > Can someone give me an idea about how to see

Re: [algogeeks] Re: print vertical sums of a binary tree

2011-10-18 Thread rahul patil
On Tue, Oct 18, 2011 at 6:31 PM, rahul patil wrote: > Use recursion with the code as follows > > sum array of sums, with horizontal levels, level 0 is for leftmost element > > void add(node *root, int *sum, int level) > { > if(root->left) >

Re: [algogeeks] Reconstruct BST from preorder traversal

2011-10-18 Thread rahul patil
g/algogeeks/-/3TnK7Rk4vtcJ. > 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: print vertical sums of a binary tree

2011-10-18 Thread rahul patil
roups.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, Rahul Patil -- You received this message because you are subscribed to the

Re: [algogeeks] Reconstruct BST from preorder traversal

2011-10-18 Thread rahul patil
; For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Regards, Rahul Patil -- 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

Re: [algogeeks] Re: Adobe

2011-10-14 Thread rahul sharma
i dnt knw why still these posts are allowed in algogeeks On Fri, Oct 14, 2011 at 7:37 PM, WgpShashank wrote: > @All Join Interview-Street Group For Detailed Discussion About Interview > Process of Particular Company , if You Have particular question & wants to > discuss here , put that directly ,

Re: [algogeeks] Amazon Question - Find Pythagorean triplet in an unsorted array

2011-10-14 Thread rahul patil
suppose sorted array is 1,2,3,5,10,12,13,17,19,25 so if u want to find possible combinations, with 25 as hypotenuse, then only range 10 ... 19 could have answer as 19 + 10 > 25 On Fri, Oct 14, 2011 at 3:14 PM, Ankur Garg wrote: > @Rahul > > Pls elaborate with an example ... >

Re: [algogeeks] Amazon Question - Find Pythagorean triplet in an unsorted array

2011-10-14 Thread rahul patil
given int > array. > > @ rahul, Hash of z^2 - x^2 for each pair of z,x itself will of the size > n*(n-1). I am not sure how it will work in O(n) time then. > > Thanks, > - Ravindra > > > On Fri, Oct 14, 2011 at 12:25 AM, Ankur Garg wrote: > >> @rahul...How

[algogeeks] Amazon Question - Find Pythagorean triplet in an unsorted array

2011-10-13 Thread rahul
You can create a hash with sqrt(z2-x2). This will make it o(n). The interviewer just made it lil tricky. That's all -- 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/alg

Re: [algogeeks] adobe question help

2011-10-11 Thread rahul patil
gt; 8int right = ((1 << i) - 1); > 9 > 10 // 1's, with 0s between i and j > 11 int mask = left | right; > 12 > 13 // Clear i through j, then put m in there > 14 return (n & mask) | (m << i); > 15 } > > > Gaurav > > > On Oct 1,

Re: [algogeeks] remove duplicate words from a string

2011-10-10 Thread rahul sharma
if the string is sorted then int rmvDup(char arr[],int arrLen) { int i,j; for (i =1,j=0; i< arrLen;i++) { if (arr[j] != arr[i]) { arr[j+1] = arr[i]; j = j+1; } } arr[j]='\0'; return j+1; } On Tue, Oct 11, 2011 at 9:18

Re: [algogeeks] Fwd: why we can not swap values using macro?

2011-10-10 Thread rahul sharma
macros i thnik cant swap pointers..i have doubt for same it is test ur c skil question On Sun, Oct 9, 2011 at 10:08 PM, sunny agrawal wrote: > because you have not made any call to swap values of x and y > > I Don't know what you are trying to do here > if you want to swap values why are you not

Re: [algogeeks] Re: amazon,microsoft link list probs

2011-10-10 Thread rahul patil
ogeeks?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...@

Re: [algogeeks] Re: MS test cases type Questions

2011-10-09 Thread rahul sharma
there r lot of stuff for this in algogeeks.plz u all r requested to post these kind of quries on interview-street..i can tell u this last tym... for testing profyl questions will be : 1.u open word fyl and do wrk and save...what can be test cases that error can pccur. 2. u taking to frnd on

Re: [algogeeks] Database Classes

2011-10-08 Thread Rahul Verma
You are welcome. -- 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/-/WJz0FGP5wUgJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscri

Re: [algogeeks] SUGGESTIOn TO ALGo GEEKS

2011-10-08 Thread rahul sharma
iterview street...hope it helps... On Sat, Oct 8, 2011 at 11:06 PM, shady wrote: > ya, how to do it ? > how to move all discussions from one group to another if you know the > procedure then reply. :D > > On Sat, Oct 8, 2011 at 10:41 PM, rahul sharma wrote: > >> I h

[algogeeks] SUGGESTIOn TO ALGo GEEKS

2011-10-08 Thread rahul sharma
I have a suggestion to made...as a new group interview-street is there..but still a lot more info is available here in algogeeks only..so cant the owner of group move all the info about all the companies from algogeeks to interview-street.like pattern n ctc n etc..so that if somebody try to find th

[algogeeks] Database Classes

2011-10-08 Thread Rahul Verma
Hi friends, Sorry for this off topic, but I found that it would be interesting for us that now we have online classes of Databases from Stannford.db-class.org -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To view this discussion on th

Re: [algogeeks] Re: explain the output please.....

2011-10-07 Thread rahul sharma
o/p : fail 1 between c and u they will be in range so stored as it is but i is -16 converted to 2 complement n become -32 thats y On Sat, Oct 8, 2011 at 2:02 AM, Rahul Tiwari wrote: > o/p - fail1 >pass2 > > xplaination - as char range = (-127 to +127) so char c=-64 is

Re: [algogeeks] Re: Operating System

2011-10-07 Thread Rahul
CROWLEY +1 Rahul On Sat, Oct 8, 2011 at 2:26 AM, saurabh araiyer wrote: > OS by Crowly (design oriented approach) is a nice book > > -- > Regards > Saurabh Araiyer > http://www.decapsulatingabstraction.blogspot.com > > -- > You received this message because you a

[algogeeks] Re: explain the output please.....

2011-10-07 Thread Rahul Tiwari
o/p - fail1 pass2 xplaination - as char range = (-127 to +127) so char c=-64 is ok so (c>i) condition z not true ..so else part got executed . but u is unsigned so its actual value z , u = some very high + no. so i wrote: > i have run the program in turbo c and getting same o/p as

[algogeeks] Re: implementation of malloc

2011-10-07 Thread Rahul Tiwari
http://www.sendspace.com/file/wxqx5l On Oct 7, 10:09 am, saurabh singh wrote: > It uses the system call brk > > On Fri, Oct 7, 2011 at 10:23 AM, praneethn wrote: > > can somebody provide the link or explain how malloc is implemented > > internally as googling didn't help me. > > > -- > >

Re: [algogeeks] print all numbers in a given range without using any loop statements, jump statements and recursion

2011-10-07 Thread rahul sharma
yeah fyn On Fri, Oct 7, 2011 at 1:18 PM, tanuj chawla wrote: > @rahul - ya sure. i write the code for printing 1 to 100 and vice > versa.. u can remove --i in the destructor.. sorry... > > -- > You received this message because you are subscribed to the Google Grou

Re: [algogeeks] print all numbers in a given range without using any loop statements, jump statements and recursion

2011-10-06 Thread rahul sharma
it will work without having --i in destructor???y is it here?> On Fri, Oct 7, 2011 at 11:44 AM, tanuj chawla wrote: > #include > int i; > class A > { > public: > A(){cout< ~A(){cout<<--i< } > int main() > { > A a[100]; > return 0; > } > > > > On Thu, Oct 6, 2011 at 10:42 PM, shiva@Algo wrote: >

[algogeeks] Re: Qualcomm

2011-10-05 Thread Rahul Tiwari
@prag .. dude those 2 guys r not frm cs-it & 1 more thine udit is also from our college (MNNIT Allahabad ) .. & udit hi vo banda hai jiska technical sabse achha gaya tha qualcomm me but after 1 hour good tech round, w/o any reason QUALCOMM rejects udit .. udit z jst xpressing his xperi

[algogeeks] nagle's algorithm

2011-10-05 Thread Rahul Tiwari
plz suggest any good link that covers the complete basics abt nagle's algo ... -- 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] unix book

2011-10-05 Thread rahul patil
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, Rahul Pa

Re: [algogeeks] suggestion

2011-10-05 Thread rahul sharma
dnt agreee..everyone should get chance...the admin should post that wat to post n wat not not toif again someone post abou the companies n ctc etc.. he should be warn...else on second chance he should be droped from the group On Wed, Oct 5, 2011 at 11:03 AM, saurabh singh wrote: > well l

Re: [algogeeks] Re: best way to learn data structure

2011-10-04 Thread Rahul
http://www.stanford.edu/class/cs106x/ http://see.stanford.edu/see/courseinfo.aspx?coll=11f4f422-5670-4b4c-889c-008262e09e4e Awesome You need to have Visual Studio 2005 On Tue, Oct 4, 2011 at 10:14 PM, shady wrote: > there is nothing like best book... which covers all concepts... books are >

[algogeeks] Re: best way to learn data structure

2011-10-04 Thread Rahul Verma
Hey Raghav, No methods are worst or best. Just go through any book you have and try the atleast 5 or 6 problems of various difficulty level based on that data structure. Try to think about the functionality of the data structure, so that you can implement it in various situations or use it

Re: [algogeeks] New Group For Practicing and Learning Efficient Ways of Coding

2011-10-03 Thread Rahul Verma
Hey, I have a suggestion that why we don't have a discussion on some topic for full one week and after that we can discuss problems from various programming sites and discuss the best solution of the problems.. -- You received this message because you are subscribed to the Google Groups "Alg

Re: [algogeeks] Re: MS question

2011-10-03 Thread rahul sharma
got it..thnx yr On Tue, Oct 4, 2011 at 8:34 AM, rahul sharma wrote: > so we shoul d aslo add loop at the top to find only for firrst row and > column the initial values > > > On Tue, Oct 4, 2011 at 8:30 AM, Ashish Goel wrote: > >> 0 in 0th row as well as 0 i

Re: [algogeeks] Re: MS question

2011-10-03 Thread rahul sharma
ailure" > +919985813081 > +919966006652 > > > On Tue, Oct 4, 2011 at 8:28 AM, rahul sharma wrote: > >> row0 and col0 initilayy true coz we have 0 in 0 row???or these r default >> values? >> >> >> On Tue, Oct 4, 2011 at 8:07 AM, Ashish Goel wr

Re: [algogeeks] Re: MS question

2011-10-03 Thread rahul sharma
0 and col0 vars > > > final output is > 0 0 0 0 > 0 0 0 0 > 0 1 0 0 > 0 0 0 0 > > Best Regards > Ashish Goel > "Think positive and find fuel in failure" > +919985813081 > +919966006652 > > > On Tue, Oct 4, 2011 at 7:49 AM, rahul sharma wrote:

Re: [algogeeks] Re: MS question

2011-10-03 Thread rahul sharma
values to 0. > > Best Regards > Ashish Goel > "Think positive and find fuel in failure" > +919985813081 > +919966006652 > > > > On Mon, Oct 3, 2011 at 12:08 PM, rahul sharma wrote: > >> yeah it is wrong..i have a solution but uses 0(n+m) space.

Re: [algogeeks] Re: string compress/expand

2011-10-03 Thread rahul sharma
mes a3b4bb* >count=1; >index = index+2; > } > } > s[index-1]='\0'*;//terminate the string* *(a3b4bb will become a3b4)* > > } > > On Mon, Oct 3, 2011 at 12:12 PM, rahul sharma wrote: > >> check my code for compressio

[algogeeks] Re: oracle finance questions

2011-10-03 Thread Rahul Tiwari
colg ? pkg ??? On Oct 3, 7:36 pm, amit kannaujiya wrote: > if any one know  regarding oracle finance online test, plz post type of > questions asked in online test . -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, se

Re: [algogeeks] Re: Urgent sol needed

2011-10-03 Thread rahul sharma
row[i] = 1; >> > column[j] = 1; >> > } >> > } >> > >> > } >> > >> > // Set arr[i][j] to 0 if either row i or column j has a 0 >> > for (int i = 0; i < matrix.length; i++) { >> >

Re: [algogeeks] New Group For Practicing and Learning Efficient Ways of Coding

2011-10-03 Thread Rahul Verma
@shady we need moderators to stop spamming and to restrict the no. of problems -- 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/-/gArbDhccZG8J. To post to thi

Re: [algogeeks] Re: zigzag matrix

2011-10-03 Thread Rahul Verma
@Hatta Thanks a lot dear. -- 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/-/jCx1kM6n4RwJ. To post to this group, send email to algogeeks@googlegroups.com. T

Re: [algogeeks] Re: zigzag matrix

2011-10-03 Thread Rahul Verma
we can achieve the zigzag form of the matrix by performing below steps: int i=1,j=1; For(i=0;i=n && i<=m) j increases upto value of m Elseif(i>m) j increases upto value of n+m-i. } *For e.g* *for a 4X6 matrix* *Input:* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2

[algogeeks] c help

2011-10-03 Thread rahul sharma
% p prints the corresponding argument that is pointer.can nyone given an xample plz? -- 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 ema

[algogeeks] InterNSHIP for PRE final YEAR....................Hydrabaad MS

2011-10-03 Thread rahul sharma
http://www.microsoft-careers.com/job/Hyderabad-Intern-Job/1439341/?feedId=315&utm_source=Indeed -- 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, s

[algogeeks] Re: zigzag matrix

2011-10-03 Thread Rahul Verma
@Anika What do you mean with the zigzag fashion here in problem? -- 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/-/5rO1BmBFlZwJ. To post to this group, send

Re: [algogeeks] Re: string compress/expand

2011-10-02 Thread rahul sharma
; int c=1; for(int i=0;str[i];i++) { if(str[i+1]>='0' && str[i+1]<='9') { c=c+(str[i+1]-'0'); for(int j=1;jwrote: > @rahul sharma > > for that you have to check that string is alph

Re: [algogeeks] Re: string compress/expand

2011-10-02 Thread Rahul Verma
@rahul sharma for that you have to check that string is alphanumeric or not. if it is alphanumeric then you have to call the function exapansion else you have to call the compression function. and if the desired output for *abc *is *a1b1c1* then you have to call the *exapnsion function

Re: [algogeeks] Re: MS question

2011-10-02 Thread rahul sharma
yeah it is wrong..i have a solution but uses 0(n+m) space.i need it in 0(n*m) tymand o(1) space On Mon, Oct 3, 2011 at 11:55 AM, shady wrote: > search archives :-/ > > > On Mon, Oct 3, 2011 at 11:47 AM, pranav agrawal < > pranav.is.cool.agra...@gmail.com> wrote:

Re: [algogeeks] Re: string compress/expand

2011-10-02 Thread rahul sharma
m talking for string expansion version ..that if i/p like aaabbbccc then o/p a3b3c3 n wat to do for abc i/p in that case??? On Mon, Oct 3, 2011 at 11:13 AM, rahul sharma wrote: > @rahul verma > > yeah i know supposes i m doing for > > a3b3c3.. > > o/p :- aaabbbcc

Re: [algogeeks] Re: string compress/expand

2011-10-02 Thread rahul sharma
@rahul verma yeah i know supposes i m doing for a3b3c3.. o/p :- aaabbbccc if i give i/p: abc to same program then should it accept n display then errorrcoz abc not accepted...a1b1c1 is aceeptedor it will show abc as such.. tell me wat to do for abc On Mon, Oct 3, 2011 at

[algogeeks] Re: string compress/expand

2011-10-02 Thread Rahul Verma
@Rahul Parse the string and check the next element of the array if it is exactly the previous one then *increase the counter by 1* else no need to increase the counter. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To

[algogeeks] Re: fibonicci doubt

2011-10-02 Thread rahul sharma
find the sum of all even nos. in the fibbonacci series upto 100 it means upto when my term in fibonici is 100 stop...???ok? On Mon, Oct 3, 2011 at 8:06 AM, rahul sharma wrote: > guys if i have > > Print the sum of the even terms occuring in Fibbonaci (till 1000 terms) > > then

<    1   2   3   4   5   6   7   8   9   >