Re: [algogeeks] Math problem

2013-05-16 Thread vaibhav shukla
take cube of both sides and proceed (a+b+c)^3 = C1^3 rest do it yourself. On Thu, May 16, 2013 at 12:28 AM, Soumya Prasad Ukil ukil.sou...@gmail.comwrote: If a+b+c=C1 and ab+bc+ac=C2, how do you get abc? C1,C2 are constant. -- regards, soumya prasad ukil -- You received this message

Re: [algogeeks] Regex tester

2012-12-27 Thread vaibhav shukla
@shady : look for the implementation of Matcher class.. may be that could help . On Sun, Dec 23, 2012 at 11:01 PM, shady sinv...@gmail.com wrote: that's the point, Have to implement it from scratch... otherwise java has regex and matcher, pattern to solve it... On Sun, Dec 23, 2012

Re: [algogeeks] Check if a binary tree is Binary Search Tree or not.

2012-11-06 Thread vaibhav shukla
yes ofcourse... dats the easiest i suppose... but in one of my interviews, i told this approach, but was then asked not to use space (which i was ,to store inorder) So for such cases, you must try other approaches as well. (DO inorder,keep track of previously visited node and compare it with

Re: [algogeeks] swap objects without temp variable

2012-11-05 Thread vaibhav shukla
XOR option wont work for floating points so being generic, using temp variable is the best option for swapping. Anyways, the question requirement was to swap without temp, hence above given solutions go right. On Mon, Nov 5, 2012 at 10:43 AM, atul anand atul.87fri...@gmail.com wrote: a=a^b;

Re: [algogeeks]

2012-10-06 Thread vaibhav shukla
then please post it here as others might also be in need for the same. On Sat, Oct 6, 2012 at 2:09 PM, vindhya chhabra vindhyachha...@gmail.comwrote: m sorry for this ques:) i got to know about it. On Sat, Oct 6, 2012 at 1:42 PM, vindhya chhabra vindhyachha...@gmail.com wrote: any one has

Re: [algogeeks] Missing Number Problem

2012-10-05 Thread vaibhav shukla
external merge sort could be handy. On Fri, Oct 5, 2012 at 8:51 PM, Raghavan its...@gmail.com wrote: You mean 1 to 300million is given and any one number is missing midst of it? On Fri, Oct 5, 2012 at 12:19 AM, Sanjay Rajpal srn...@gmail.com wrote: We are given 300 million 9-digit numbers

Re: [algogeeks] java question : How can one writes a function in Java that mocks the super() call without using the super keyword?

2012-09-13 Thread vaibhav shukla
whats the need for such a hack On Wed, Sep 12, 2012 at 10:56 AM, bharat b bagana.bharatku...@gmail.comwrote: -- 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

Re: [algogeeks] Number of arrangements

2012-09-06 Thread vaibhav shukla
cmon.. what logic are you applying ? its the arrangements.. so basically this is what will happen there are three places __,__,__ first can be filled in 6 ways,Since repetition is not allowed,second place could be filled in 5 ways and third in 4 So total arrangements so far = 6*5*4 = 120 . Now

Re: [algogeeks] Number of arrangements

2012-09-06 Thread vaibhav shukla
I guess 720 must be the ans. Its like forming three-letter words out of given 6 without repetition. In that case = 6p3 * 3! On Thu, Sep 6, 2012 at 3:53 PM, atul anand atul.87fri...@gmail.com wrote: seems output should be 20. On Thu, Sep 6, 2012 at 3:26 PM, tendua bharat.kra...@gmail.com

Re: [algogeeks] max sum b/w 2 leaf nodes in a binary tree

2012-08-28 Thread vaibhav shukla
I guess it might be finding maximum sum path for left subtree + max sum path for right subtree + root-data As in case of finding the diameter which say height(root-left)+height(root-right)+1 Please correct me! On Mon, Aug 27, 2012 at 11:46 PM, kunal rustgi rustogi.ku...@gmail.comwrote: @ravi

Re: [algogeeks] Snapdeal Paper Pattern

2012-08-24 Thread vaibhav shukla
its DU . please guide with watever details you have. thanks On Fri, Aug 24, 2012 at 4:42 PM, JITESH KUMAR jkhas...@gmail.com wrote: Which college? I can help you. On Wed, Aug 22, 2012 at 11:23 PM, Arun Kindra arunkin...@gmail.comwrote: Anyone know the paper pattern or ques of snapdeal?

Re: [algogeeks] Re: INTERFACES VS ABSTRACT

2012-08-23 Thread vaibhav shukla
Abstract class are used for Abstraction Interface are used for Polymorphism On Thu, Aug 23, 2012 at 6:06 PM, Amit Tiwari amit.monu...@gmail.com wrote: With an abstract class, the subclass of that inheritance tree only can and should provide the definitions of the methods. With an interface,

Re: [algogeeks] JAVA PROGRAM ERROR

2012-08-22 Thread vaibhav shukla
U r passing x in the method stringTimes and in loop there is 'n' .. so complier error :P make it x and u'll get HiHi On Wed, Aug 22, 2012 at 2:36 AM, Rohit Singhal rsinghal.it...@gmail.comwrote: what error it is showing On Wed, Aug 22, 2012 at 12:41 AM, Rajesh Kumar

Re: [algogeeks] converting binary tree to BST

2012-08-08 Thread vaibhav shukla
doubly linked list by each time selecting middle node and recursively calling left part of linked list and right part of linked list. On Tue, Aug 7, 2012 at 10:23 PM, vaibhav shukla vaibhav200...@gmail.comwrote: Hi all The problem is to convert a binary tree into Binary Search Tree My

[algogeeks] converting binary tree to BST

2012-08-07 Thread vaibhav shukla
Hi all The problem is to convert a binary tree into Binary Search Tree My approach was : 1. Store the Inorder traversal of BT in an array. 2. Sort the array in ascending order. 3. Again do inorder traversal and write the Node's data from array one by one. This approach takes O(n) extra space.

[algogeeks] amazon online test question

2012-08-05 Thread vaibhav shukla
Given a singly linked list with a random pointer pointing to any node(can be even null). Create a clone of the list. node structure can be : struct node { struct node *next; struct node *random;

Re: [algogeeks] amazon online test question

2012-08-05 Thread vaibhav shukla
... Basically they want to make Sure U understand the question.. Implementation is jst a copy of the content of the current SLL Node and rewiring the rest. On Sun, Aug 5, 2012 at 6:39 PM, vaibhav shukla vaibhav200...@gmail.comwrote: Given a singly linked list with a random pointer pointing

Re: [algogeeks] Java Design Question..

2012-08-03 Thread vaibhav shukla
you had the java class so now wats the need of any implementation :P well jokes apart Specify the exact requirement ie when u say method which returns the respective object of the class based on given data(instance variable : what type of object you want from this method? and what does these

Re: [algogeeks] Appropriate data structure

2012-07-15 Thread vaibhav shukla
Stack will do it... and min or max can be even retrieved in O(1) ... On Sun, Jul 15, 2012 at 6:36 PM, adarsh kumar algog...@gmail.com wrote: Oh ya sorry. I thought we have to retrieve kth min and max, in which case heap can be used. Here, we can either use stack or map. Map can be from a

Re: [algogeeks] Re: Given only a pointer to a node to be deleted in a singly linked list how you handle deleting last node

2012-07-10 Thread vaibhav shukla
For such case .. circular linked list will come handy to be able to delete last node. On Tue, Jul 10, 2012 at 8:28 AM, deepikaanand swinyanand...@gmail.comwrote: No there is no way to delete the last node in such a situation though u can replace the info part of such a last node with

Re: [algogeeks] Explain the output

2012-06-28 Thread vaibhav shukla
This might Help http://en.wikipedia.org/wiki/Quine_(computing) On Thu, Jun 28, 2012 at 2:01 PM, Mad Coder imamadco...@gmail.com wrote: Please explain the output of following C code #includestdio.hchar *str = char *str = %c%s%c; main(){ printf(str, 34, str, 34);}; int main() {

Re: [algogeeks] Re: puzzle

2011-10-06 Thread vaibhav shukla
4 boys , 3 girls .. 7 children b: no. of boys g: no of girls b-1=g (1st condition) b=2(g-1) (2nd condition) gives the answer On Thu, Oct 6, 2011 at 3:42 PM, shady sinv...@gmail.com wrote: 7, try thinking by yourself... if anyone has some different answer only then post On Oct 6, 3:05

Re: [algogeeks] SEEK advice very urgent

2011-09-01 Thread vaibhav shukla
if there is no bond then u must go... after all its money and technology for which japan is good.. gud luck On Thu, Sep 1, 2011 at 12:39 PM, rahul sharma rahul23111...@gmail.comwrote: salary is good...u can gobe with in technology with japannn..gud luck On Thu, Sep 1, 2011 at 12:37

Re: [algogeeks] Re: Find square root a number

2011-08-30 Thread vaibhav shukla
newton raphson will do it.. :) On Tue, Aug 30, 2011 at 3:55 PM, UTKARSH SRIVASTAV usrivastav...@gmail.comwrote: i don't whethe you have studied a subject cbnst from that use newton raphson method On Tue, Aug 30, 2011 at 2:39 AM, Ankuj Gupta ankuj2...@gmail.com wrote: U can use binary

[algogeeks] question to code

2011-08-21 Thread vaibhav shukla
given three sorted arrays not necessary of same length (length is given) we have to determine the middle element such that the element will be the middle one of the such an array which will be formed if all three given arrays are merged in sorted order. input :- arr1 : 1,3,5,7 arr2

Re: [algogeeks] question to code

2011-08-21 Thread vaibhav shukla
:) On Sun, Aug 21, 2011 at 10:34 AM, Puneet Chawla puneetchawla...@gmail.com wrote: Here by just applying merge on these array as they are sorted and calculate the middle element..Am i rt..??? On Sun, Aug 21, 2011 at 10:59 PM, vaibhav shukla vaibhav200...@gmail.com wrote: given three sorted

Re: [algogeeks] question to code

2011-08-21 Thread vaibhav shukla
, 2011 at 11:09 PM, vaibhav shukla vaibhav200...@gmail.comwrote: @puneet : but u cant use extra memory On Sun, Aug 21, 2011 at 11:08 PM, Sanjay Rajpal srn...@gmail.com wrote: Take three pointers to the beginning of each array say i,j,k. Now let sum = len a +len b + len c. k=0 now start from

Re: [algogeeks] probability! tough one to crack!

2011-08-19 Thread vaibhav shukla
area of coin = pie * 1^2 = n(e) area of square= 2^2 * 4(as there are four such squares)= n(S) probablility = n(E)/n(S) = pie/16 . the ans ;) On Fri, Aug 19, 2011 at 10:20 PM, priya ramesh love.for.programm...@gmail.com wrote: A 1 inch diameter coin is thrown on a table covered with a

Re: [algogeeks] Re: Link list problem..

2011-08-08 Thread vaibhav shukla
current node deletion is possible just copy the next value to the current value,now u are required to delete the next node.Simple. but if the deleted node is last one...this will give problem but that too can be solved if using circular link list On Mon, Aug 8, 2011 at 9:54 PM, Debabrata Das

Re: [algogeeks] ThoghtWorks on campus

2011-08-08 Thread vaibhav shukla
@raj : its about to come to our campus too..questions hv been uploaded already in grp. Do send the questions which they ask please On Tue, Aug 9, 2011 at 12:09 AM, raj kumar megamonste...@gmail.com wrote: hi friends , thoughtworks is coming to our campus after two days. please send me the

Re: [algogeeks] ThoghtWorks on campus

2011-08-08 Thread vaibhav shukla
@somya : pls mail me the questions which they asked On Tue, Aug 9, 2011 at 12:20 AM, somya mishra somya.bvm...@gmail.comwrote: 5.85 ctc On Tue, Aug 9, 2011 at 12:19 AM, somya mishra somya.bvm...@gmail.comwrote: firstly there will be a written round whose questions will be modelled to test

Re: [algogeeks] Rotate a 2-D matrix by 90 degree inplace.

2011-08-06 Thread vaibhav shukla
first transpose it now reverse colums if u want a clockwise rotation else reverse rows for anti clockwise rotation On Sat, Aug 6, 2011 at 11:48 PM, Algo Lover algolear...@gmail.com wrote: Can anyone solve this problem without using extra matrix -- You received this message because you are

[algogeeks] remove duplicate words in a string

2011-08-05 Thread vaibhav shukla
Given a string,remove all duplicates words: input: where there is a will there is a way o/p : where will way. -- best wishes!! Vaibhav MCA -- 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] Re: remove duplicate words in a string

2011-08-05 Thread vaibhav shukla
give it in C/C++ On Fri, Aug 5, 2011 at 1:57 PM, aj aj.jaswa...@gmail.com wrote: you can write a python program to do that easily. program starts here : c=str.split(raw_input()) d=[] for x in c: d[x]=0 print list(d) -- You received this message because you are subscribed to

Re: [algogeeks] Re: remove duplicate words in a string

2011-08-05 Thread vaibhav shukla
sorry one more constraint : no extra memory On Fri, Aug 5, 2011 at 2:03 PM, payel roy smithpa...@gmail.com wrote: Hash table ??? On 5 August 2011 13:58, vaibhav shukla vaibhav200...@gmail.com wrote: give it in C/C++ On Fri, Aug 5, 2011 at 1:57 PM, aj aj.jaswa...@gmail.com wrote: you

Re: [algogeeks] Re: remove duplicate words in a string

2011-08-05 Thread vaibhav shukla
provide a solution whether greater than O(n) On Fri, Aug 5, 2011 at 2:09 PM, saurabh singh saurab...@gmail.com wrote: use maps for implementation of hash table... if no extra memory allowed then no possible solution within o(n) i think. On Fri, Aug 5, 2011 at 2:07 PM, ankit sambyal

Re: [algogeeks] Re: remove duplicate words in a string

2011-08-05 Thread vaibhav shukla
, vaibhav shukla vaibhav200...@gmail.com wrote: provide a solution whether greater than O(n) On Fri, Aug 5, 2011 at 2:09 PM, saurabh singh saurab...@gmail.com wrote: use maps for implementation of hash table... if no extra memory allowed then no possible solution within o(n) i think

Re: [algogeeks] Sort IT

2011-08-02 Thread vaibhav shukla
we can use radix sort On Tue, Aug 2, 2011 at 7:41 PM, payel roy smithpa...@gmail.com wrote: It may create duplicate numbers while converting into base N. How do recognize them while converting into base(N^2)?? On 2 August 2011 17:20, Harshit Kapoor kapoor...@gmail.com wrote: I think that

Re: [algogeeks] Microsoft Internship

2011-08-02 Thread vaibhav shukla
@saurabh : then please explain the algorithm even of using 8 ints On Tue, Aug 2, 2011 at 7:24 PM, saurabh singh saurab...@gmail.com wrote: and optimize as much as you can...even if the interviewer says that he is satisfied I was asked Q.1 mentioned above.I first used bitset.He asked me

Re: Re: Re: Re: [algogeeks] Re: MS

2011-08-02 Thread vaibhav shukla
side of the largest square = H.C.F of length and breadth total no. of squares = (length*breadth) / side^2 On Tue, Aug 2, 2011 at 7:27 PM, vaibhavmitta...@gmail.com wrote: A and B are length and breath of current rectangle to fill.. in above example in the ques if i fill 1x1 squares along

Re: [algogeeks] HOW GARBAGE COLLECTOR WORKS IN JAVA

2011-07-31 Thread vaibhav shukla
and finallize the objects. 3: when we call using System.gc or Runtime.getruntime.gc pls correct me if i m wrong On Sat, Jul 30, 2011 at 11:10 AM, vaibhav shukla vaibhav200...@gmail.comwrote: please give a glimps of how garbage collection is done in java. how *System.gc()* works ? -- best

[algogeeks] HOW GARBAGE COLLECTOR WORKS IN JAVA

2011-07-30 Thread vaibhav shukla
please give a glimps of how garbage collection is done in java. how *System.gc()* works ? -- best wishes!! Vaibhav -- 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] Output Help.

2011-07-30 Thread vaibhav shukla
concept of sequence points.search wiki On Sun, Jul 31, 2011 at 1:38 AM, aditi garg aditi.garg.6...@gmail.comwrote: it would be undefined... On Sun, Jul 31, 2011 at 1:34 AM, Kamakshii Aggarwal kamakshi...@gmail.com wrote: 3.it is same as b=b+1; On Sun, Jul 31, 2011 at 1:32 AM, aseem

Re: [algogeeks]

2011-07-29 Thread vaibhav shukla
If u have 2GB of data file which has one string per line and u have to sort it, and X MB of memory is available.then divide the file into 'K' chunks of X MB each. Bring each chunk into memory and sort lines by any usual O(nlgn) algorithm \. Save the lines back to files. D this for all chunks and

Re: Re : [algogeeks] Re: size of self referential structure

2011-07-26 Thread vaibhav shukla
will there be any difference in size on 32 machine and on 64 bit machine ? how and what ? On Tue, Jul 26, 2011 at 7:58 PM, kavitha nk kavithan...@gmail.com wrote: sry frendzma above posts were wrongans is 28 if ptr takes 4 bytes... //BE COOL// kavi -- You received this message

Re: [algogeeks] fibonacci

2011-07-24 Thread vaibhav shukla
add printf(\b); after while loop On Sun, Jul 24, 2011 at 7:54 PM, nullpointer nullpointer...@gmail.comwrote: #includestdio.h main() {int a,b,n,fib=0; a=0,b=1; scanf(%d,n); if(n==0||n==1) printf(%d\n,n); while(n--!=0) { fib=a+b; a=b; b=fib; printf(%d+,fib); } } for n = 3 o/p

Re: [algogeeks] Nagarro Coding Round Ques......

2011-07-24 Thread vaibhav shukla
generate all possible permutations and check each permutation whether it is palindrome or not. On Sun, Jul 24, 2011 at 7:55 PM, UMESH KUMAR kumar.umesh...@gmail.comwrote: Using the all characters of a given String how to specify either a palindrome or not. Ex:- 1) String=teste After

Re: [algogeeks] fibonacci

2011-07-24 Thread vaibhav shukla
then too it will work. the purpose is just to eliminate the last plus sign On Sun, Jul 24, 2011 at 8:04 PM, naveen ms naveenms...@gmail.com wrote: hey if n is 0 or 1..then \b wont work...i mean there ll be no output at all -- You received this message because you are subscribed to the Google

Re: [algogeeks] fibonacci

2011-07-24 Thread vaibhav shukla
:) :) On Sun, Jul 24, 2011 at 8:14 PM, naveen ms naveenms...@gmail.com wrote: ya...coz new line is printed in the first PRINTF..it works fine..:) -- 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] Circular list

2011-07-22 Thread vaibhav shukla
maintain just a tail pointer On Sat, Jul 23, 2011 at 12:45 AM, rShetty rajeevr...@gmail.com wrote: Come Up with an Algorithm to implement the insertion of a node in circular linked list without actually traversing the list ? -- You received this message because you are subscribed to the

Re: [algogeeks] Re: Circular list

2011-07-22 Thread vaibhav shukla
. On Sat, Jul 23, 2011 at 12:50 AM, rShetty rajeevr...@gmail.com wrote: Algorithm Please ... Thank You On Jul 23, 12:17 am, vaibhav shukla vaibhav200...@gmail.com wrote: maintain just a tail pointer On Sat, Jul 23, 2011 at 12:45 AM, rShetty rajeevr...@gmail.com

Re: [algogeeks] Long string and the first non-repeating character

2011-07-18 Thread vaibhav shukla
one solution could be: #includestdio.h #includestring.h char non_repetition(char *p,int size) { int i,j,flag=0; for(i=0;isize;i++) { for(j=0;jsize;j++) { if(j==i) continue; if(p[i]==p[j]) flag=1; }

Re: [algogeeks] Reverse a List with Recursion

2011-07-17 Thread vaibhav shukla
. 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. -- best wishes!! Vaibhav Shukla DU-MCA -- You received this message because you are subscribed to the Google

Re: [algogeeks] Re: Free memory

2011-07-17 Thread vaibhav shukla
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. -- best wishes!! Vaibhav Shukla DU-MCA -- You received

Re: [algogeeks] MS Question

2011-07-15 Thread vaibhav shukla
, 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. -- best wishes!! Vaibhav Shukla DU-MCA -- You received this message

Re: [algogeeks] Re: Adding w/o +

2011-07-13 Thread vaibhav shukla
...@gmail.comwrote: @vaibhav: no it wont coz its printing empty strings.. nothing will be printed On Wed, Jul 13, 2011 at 4:42 PM, vaibhav shukla vaibhav200...@gmail.comwrote: @anika : ur ans will give the sum but will also leave that much amount of space before printing the sum one betther idea

Re: [algogeeks] Re: Minimum/Maximum Sum path in A Binary Tree

2011-07-13 Thread vaibhav shukla
this group at http://groups.google.com/group/algogeeks?hl=en. -- best wishes!! Vaibhav Shukla DU-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

Re: [algogeeks] Re: Improve upon O(m^2)

2011-07-13 Thread vaibhav shukla
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. -- best wishes!! Vaibhav Shukla DU-MCA -- You received this message because

Re: [algogeeks] Re: Precedence of operators

2011-07-13 Thread vaibhav shukla
evaluate not other two increments :) On Sun, Jul 10, 2011 at 11:31 PM, rShetty rajeevr...@gmail.com wrote: Got it Thanks . On Jul 10, 10:40 pm, vaibhav shukla vaibhav200...@gmail.com wrote: associativity comes into play when operators are of same precedence. On Sun, Jul 10, 2011 at 11:08 PM

Re: [algogeeks] Re: sbtration

2011-07-12 Thread vaibhav shukla
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. -- best wishes!! Vaibhav Shukla DU

Re: [algogeeks] microsoft ques

2011-07-12 Thread vaibhav shukla
/group/algogeeks?hl=en. -- best wishes!! Vaibhav Shukla DU-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: [algogeeks] c doubt

2011-07-11 Thread vaibhav shukla
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. -- best wishes!! Vaibhav Shukla DU-MCA -- You received

Re: [algogeeks] linked list doubt

2011-07-11 Thread vaibhav shukla
to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- best wishes!! Vaibhav Shukla DU-MCA -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group

Re: [algogeeks] linked list doubt

2011-07-11 Thread vaibhav shukla
time.when the first ptr reaches end then seconf ptr will be at middle On Mon, Jul 11, 2011 at 6:15 PM, vaibhav shukla vaibhav200...@gmail.comwrote: i have considered it (n/2+1)th and didn't bothered much :P On Mon, Jul 11, 2011 at 4:57 PM, Anika Jain anika.jai...@gmail.comwrote: *if i

Re: [algogeeks] plz tell how many times loop will execute and why?

2011-07-11 Thread vaibhav shukla
this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- best wishes!! Vaibhav Shukla DU-MCA -- You received this message because you are subscribed to the Google Groups Algorithm Geeks

Re: [algogeeks] puzzle

2011-07-10 Thread vaibhav shukla
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. -- best wishes!! Vaibhav Shukla DU-MCA -- You received this message because

Re: [algogeeks] MS

2011-07-10 Thread vaibhav shukla
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. -- best wishes!! Vaibhav Shukla DU-MCA -- You received this message because you

Re: [algogeeks] MS

2011-07-10 Thread vaibhav shukla
with n=(height*width)/side^2 .. u can calculate the side if n would be given. On Sun, Jul 10, 2011 at 10:37 PM, vaibhav agarwal vibhu.bitspil...@gmail.com wrote: @vaibhav this fails as n will be provided in the question. On Sun, Jul 10, 2011 at 9:56 PM, vaibhav shukla vaibhav200

Re: [algogeeks] Precedence of operators

2011-07-10 Thread vaibhav shukla
associativity comes into play when operators are of same precedence. On Sun, Jul 10, 2011 at 11:08 PM, vaibhav shukla vaibhav200...@gmail.comwrote: has higher precedence than || the expression is evaluated as z=j || ( k i ); hence the output i.e 1 ;) On Sun, Jul 10, 2011 at 11:06 PM

Re: [algogeeks] Yahoo Question

2011-07-10 Thread vaibhav shukla
. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- best wishes!! Vaibhav Shukla DU-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

Re: [algogeeks] puzzle

2011-07-09 Thread vaibhav shukla
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. -- best wishes!! Vaibhav Shukla DU-MCA -- You received this message because you

Re: [algogeeks] Implementing QUEUE with Singly link list

2011-07-05 Thread vaibhav shukla
, 2011 at 10:20 PM, surender sanke surend...@gmail.comwrote: always maintain front and rear pointers, updating them accordingly during insertion and deletion can achieve this in O(1) surender On Mon, Jul 4, 2011 at 9:59 PM, vaibhav shukla vaibhav200...@gmail.com wrote: How to implement

[algogeeks] Implementing QUEUE with Singly link list

2011-07-04 Thread vaibhav shukla
How to implement a QUEUE using a singly link list such that the operations ENQUEUE and DEQUEUE takes O(1) time ? -- best wishes!! Vaibhav Shukla -- 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] Implementing QUEUE with Singly link list

2011-07-04 Thread vaibhav shukla
, 2011 at 9:59 PM, vaibhav shukla vaibhav200...@gmail.comwrote: How to implement a QUEUE using a singly link list such that the operations ENQUEUE and DEQUEUE takes O(1) time ? -- best wishes!! Vaibhav Shukla -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] Re: Number of Comparisons!

2011-07-03 Thread vaibhav shukla
. 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. -- best wishes!! Vaibhav Shukla DU-MCA -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] pointer increment problem can anyone tell why this output is coming?

2011-07-02 Thread vaibhav shukla
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. -- best wishes!! Vaibhav Shukla DU-MCA -- You received this message because you are subscribed to the Google Groups Algorithm

Re: [algogeeks] Re: 2 D array(dynamic allocation)

2011-07-02 Thread vaibhav shukla
://groups.google.com/group/algogeeks?hl=en. -- best wishes!! Vaibhav Shukla -- 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: [algogeeks] query

2011-06-29 Thread vaibhav shukla
@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. -- best wishes!! Vaibhav Shukla DU-MCA -- You received this message because you are subscribed

Re: [algogeeks] Reverse

2011-06-27 Thread vaibhav shukla
...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- best wishes!! Vaibhav Shukla DU-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

Re: [algogeeks] Reverse

2011-06-27 Thread vaibhav shukla
h.yup On Mon, Jun 27, 2011 at 10:18 PM, vaibhav agarwal vibhu.bitspil...@gmail.com wrote: @vaibhav just like u swap two int variable without using 3rd On Mon, Jun 27, 2011 at 10:17 PM, vaibhav shukla vaibhav200...@gmail.comwrote: and how will swap without using temp variable

[algogeeks] Please explain the output

2011-06-23 Thread vaibhav shukla
#includestdio.h #define power(a) #a int main() { printf(%d,*power(432)); return 0; } ans is 52 on gcc. Explain plss -- best wishes!! Vaibhav Shukla DU-MCA -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send

Re: [algogeeks] Please explain the output

2011-06-23 Thread vaibhav shukla
position of the string, 52, which is the ascii value of 4, will be printed. On Thu, Jun 23, 2011 at 3:40 PM, vaibhav shukla vaibhav200...@gmail.comwrote: #includestdio.h #define power(a) #a int main() { printf(%d,*power(432)); return 0; } ans is 52 on gcc. Explain plss -- best

Re: [algogeeks] without sizeof

2011-06-23 Thread vaibhav shukla
...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- best wishes!! Vaibhav Shukla DU-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

Re: [algogeeks] Sum to K problem

2011-06-20 Thread vaibhav shukla
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. -- best wishes!! Vaibhav

Re: [algogeeks] [brain teaser ] Mystery Puzzle Servant Wish 25 may

2011-05-25 Thread vaibhav shukla
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. -- best wishes!! Vaibhav Shukla DU-MCA

Re: [algogeeks] [brain teaser ] WHO IS SHORTEST 12 may

2011-05-12 Thread vaibhav shukla
, 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. -- best wishes!! Vaibhav Shukla DU-MCA -- You received this message

Re: [algogeeks] [brain teaser ] BRAIN TEASER BLACK 4 may

2011-05-04 Thread vaibhav shukla
@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. -- best wishes!! Vaibhav Shukla DU-MCA -- You received this message because you are subscribed

Re: [algogeeks] Re: imporatnt(need help)

2011-04-28 Thread vaibhav shukla
@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. -- best wishes!! Vaibhav Shukla DU-MCA -- You received this message because you are subscribed

Re: [algogeeks] Re: imporatnt(need help)

2011-04-28 Thread vaibhav shukla
@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. -- best wishes!! Vaibhav Shukla DU-MCA -- You received this message because you are subscribed

Re: [algogeeks] Re: imporatnt(need help)

2011-04-28 Thread vaibhav shukla
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. -- best wishes!! Vaibhav Shukla DU

Re: [algogeeks] Re: imporatnt(need help)

2011-04-28 Thread vaibhav shukla
@utkarsh : that we've came to know from your last to last post...Anyways..stay cool On Thu, Apr 28, 2011 at 7:52 PM, UTKARSH SRIVASTAV usrivastav...@gmail.comwrote: But i am a BAD boy. On Thu, Apr 28, 2011 at 7:48 PM, vaibhav shukla vaibhav200...@gmail.comwrote: @utkarsh : thats like

Re: [algogeeks] imporatnt(need help)

2011-04-26 Thread vaibhav shukla
. 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. -- best wishes!! Vaibhav Shukla DU-MCA -- You

Re: [algogeeks] [brain teaser] Pirate Puzzle 21april

2011-04-21 Thread vaibhav shukla
!! Vaibhav Shukla DU-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+unsubscr...@googlegroups.com. For more options

Re: [algogeeks] [brain teaser] Pirate Puzzle 21april

2011-04-21 Thread vaibhav shukla
for or against it. * So the pirate proposing the distribution can't vote for himself. -- Shuaib http://twitter.com/ShuaibKhan http://bytehood.com/ On Thursday, April 21, 2011 at 4:43 PM, vaibhav shukla wrote: lets consider if there were only 1 pirate. obviously he would take it all for himself

Re: [algogeeks] Re: Mathematical Brain Teaser 14april

2011-04-15 Thread vaibhav shukla
://groups.google.com/group/algogeeks?hl=en. -- best wishes!! Vaibhav Shukla DU-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

Re: [algogeeks] [brain teaser ] Mathematical Brain Teaser 14april

2011-04-14 Thread vaibhav shukla
On Thu, Apr 14, 2011 at 6:49 PM, Lavesh Rawat lavesh.ra...@gmail.comwrote: * Mathematical Equation Puzzle By moving one of the following digits, make the equation correct. 62 - 63 = 1 * move 6 above 2 as its power ie 2^6-63=64-63=1 -- best wishes!! Vaibhav Shukla DU-MCA

Re: [algogeeks] [brain teaser] Sequence Puzzle 13april

2011-04-13 Thread vaibhav shukla
...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- best wishes!! Vaibhav Shukla DU-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

Re: [algogeeks] [brain teaser ] 7april

2011-04-07 Thread vaibhav shukla
...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- best wishes!! Vaibhav Shukla DU-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

Re: [algogeeks] printing without loop

2011-03-01 Thread vaibhav shukla
://groups.google.com/group/algogeeks?hl=en. -- best wishes!! Vaibhav Shukla DU-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

[algogeeks] Mathematics Problem

2011-02-25 Thread vaibhav shukla
Find the sum of digits of all the numbers whose digits are all in ascending order from left to right. All these numbers lie between 500 to 1000 and satisfy M divides (M-1)* !* + 1 , where M is any natural number. (* ! * denotes factorial of the number) -- best wishes!! Vaibhav Shukla DU

  1   2   >