Re: [algogeeks] sql queries

2010-09-14 Thread Ayush Mittal
thanks buddy. On Tue, Sep 14, 2010 at 9:41 AM, sharad kumar aryansmit3...@gmail.comwrote: teach ur self sql in 24 hrs. or use oracle complete guide.the fat book On Tue, Sep 14, 2010 at 6:50 AM, Ayush Mittal ayushmittal2...@gmail.comwrote: can anybody tell me how to command on

[algogeeks] clear screen in mysql

2010-09-14 Thread Ayush Mittal
what is the command to clear screen in mysql..? -- 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

Re: [algogeeks] clear screen in mysql

2010-09-14 Thread Rohit Saraf
See it here : jfgi http://www.urbandictionary.com/define.php?term=jfgi -- 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

Re: [algogeeks] clear screen in mysql

2010-09-14 Thread Ayush Mittal
whats this...? On Tue, Sep 14, 2010 at 12:07 PM, Rohit Saraf rohit.kumar.sa...@gmail.comwrote: See it here : jfgi http://www.urbandictionary.com/define.php?term=jfgi -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this

[algogeeks] Re: Google Interview Question-Snake and Ladder Design

2010-09-14 Thread bittu
#includestdlib.h #includestdio.h #includemath.h #includeconio.h ///O(N^2) solution Does solution exits in O(n) or (nlogn)..? reply me sum1 git dis.. //i will post analysis of dsi program later int turn, square; long game, totalgames; int seed; int chutehit[10],

[algogeeks] RE:Google Interview Question-Snake and Ladder Design

2010-09-14 Thread bittu
#includestdlib.h #includestdio.h #includemath.h #includeconio.h int turn, square; long game, totalgames; int seed; int chutehit[10], ladderhit[9]; float RunningTurnTotal; float average; char reply; void ChuteStats() {printf(Chute and Ladder Statistics:\n\n); printf(Chute0: %d Ladder0:

[algogeeks] Yahoo!!!! Puzzle

2010-09-14 Thread bittu
You are on a strict medical regimen that requires you to take two types of pills each day. You must take exactly one A pill and exactly one B pill at the same time. The pills are very expensive, and you don't want to waste any. So you open the bottle of A pills, and tap one out into your hand.

[algogeeks] Yahoo!!!! Puzzle

2010-09-14 Thread bittu
You are on a strict medical regimen that requires you to take two types of pills each day. You must take exactly one A pill and exactly one B pill at the same time. The pills are very expensive, and you don't want to waste any. So you open the bottle of A pills, and tap one out into your hand.

[algogeeks] Re: Write a program to arrange numbers from 1 to 16 such that the sum of two consecutive numbers is a perfect square

2010-09-14 Thread bittu
@Davhw can u compute in contant time where runing time dwepends on elements of array e.g. its has complexcity O(n) isn'tit..?? import java.util.Arrays; import java.util.LinkedList; class SolutionFinder { public static void find(final LinkedListInteger remaining, final

[algogeeks] RE:Write a program to arrange numbers from 1 to 16 such that the sum of two consecutive numbers is a perfect square

2010-09-14 Thread bittu
@Davhw can u compute in contant time where runing time dwepends on elements of array e.g. its has complexcity O(n) isn'tit..?? import java.util.Arrays; import java.util.LinkedList; class SolutionFinder { public static void find(final LinkedListInteger remaining, final

[algogeeks] Amazon Question make confused !!!!!!!

2010-09-14 Thread bittu
Amazon Interview Question for Software Engineer / Developers A car has speed of 72 64 56 in downhill, plain and uphill respectively . A guy travels in the car from Pt. A to pt. B in 4 Hrs and pt. B to pt. A in 4 Hrs and 40 min. what is the distance between A and B? Regards Shashank -- You

Re: [algogeeks] Yahoo!!!! Puzzle

2010-09-14 Thread vishal raja
take out that one A pill that's there in the jar. take the half of all the four pills, that's how u'll make sure that u've had 1 of 'A' and 1 of 'B' pill. On Tue, Sep 14, 2010 at 2:52 PM, bittu shashank7andr...@gmail.com wrote: You are on a strict medical regimen that requires you to take two

[algogeeks] Re: Given an array, find out if there exists a pair of nos. that adds up to a sum 'x'

2010-09-14 Thread soundar
#include iostream #include cstring #include conio.h using namespace std; int main() { int n,a[30],temp[30],x; cin n; memset(temp,0,sizeof(temp)); for(int i=0;in;i++) cin a[i]; cin x; temp[x-a[0]]=1; for(int i=1;in;i++) { if(temp[a[i]]==1)

[algogeeks] Amazon Question

2010-09-14 Thread bittu
Given 2 linked lists(which need not have unique elements) find intersection point in the form of Y.(it can be anywhere--middle or tail) Regards Shashank -- 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] Amazon Question make confused !!!!!!!

2010-09-14 Thread Yan Wang
x/72 + y/64 + z/56 = 4 x/56 + y/64 + z/72 = 4+2/3 find a solution to this ... On Tue, Sep 14, 2010 at 2:31 AM, bittu shashank7andr...@gmail.com wrote: Amazon Interview Question for Software Engineer / Developers A car has speed of 72 64 56 in downhill, plain and uphill respectively . A guy

Re: [algogeeks] Amazon Question make confused !!!!!!!

2010-09-14 Thread Abhilasha jain
how can u solve 3 variables using 2 equations? On Tue, Sep 14, 2010 at 3:44 PM, Yan Wang wangyanadam1...@gmail.com wrote: x/72 + y/64 + z/56 = 4 x/56 + y/64 + z/72 = 4+2/3 find a solution to this ... On Tue, Sep 14, 2010 at 2:31 AM, bittu shashank7andr...@gmail.com wrote: Amazon

Re: [algogeeks] Amazon Question make confused !!!!!!!

2010-09-14 Thread Yan Wang
actually, there are many solutions, just pick up one from them... On Tue, Sep 14, 2010 at 3:23 AM, Abhilasha jain mail2abhila...@gmail.com wrote: how can u solve 3 variables using 2 equations? On Tue, Sep 14, 2010 at 3:44 PM, Yan Wang wangyanadam1...@gmail.com wrote: x/72 + y/64 + z/56 = 4

Re: [algogeeks] clear screen in mysql

2010-09-14 Thread Rohit Saraf
well i just wanted u to know that there is a very nice place called www.google,com where u can find many things. -- 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

Re: [algogeeks] clear screen in mysql

2010-09-14 Thread Ayush Mittal
thanks man bt i hve searched a lot bt couln't find it...if u could help me plz...? On Tue, Sep 14, 2010 at 4:27 PM, Rohit Saraf rohit.kumar.sa...@gmail.comwrote: well i just wanted u to know that there is a very nice place called www.google,com where u can find many things. --

[algogeeks] Re: Amazon Question

2010-09-14 Thread soundar
From first linked list set flag value in each traversal of node..then start from second linked list suppose if flag value is already set that is the intersection point correct me if i am wrong -- You received this message because you are subscribed to the Google Groups Algorithm Geeks

[algogeeks] Drawing a graph

2010-09-14 Thread Mithun
Can anyone help me with the code for drawing a graph in C or CPP (using graphics) Input is an Adjacency matrix -- 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

[algogeeks] Re: Write a program to arrange numbers from 1 to 16 such that the sum of two consecutive numbers is a perfect square

2010-09-14 Thread Dave
@Bittu: First, it makes no sense to say O(n) when n is fixed. Second, if you know the solution, a program to print it out just consists of a printf statement, e.g., printf(16, 9, 7, 2, 14, 11, 5, 4, 12, 13, 3, 6, 10, 15, 1, 8\n); plus whatever language stuff you need to get it to compile and

[algogeeks] Google Interview Question

2010-09-14 Thread bittu
Write a function Brackets(int n) that prints all combinations of well- formed brackets. For Brackets(3) the output would be ((())) (()()) (()) () ()(()) ()()() -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email

[algogeeks] Google Interview Question

2010-09-14 Thread bittu
Write a function Brackets(int n) that prints all combinations of well- formed brackets. For Brackets(3) the output would be ((())) (()()) (()) () ()(()) ()()() with explaination dat is at every call what is contant of stack during pushing and popping -- You received this message because you

Re: [algogeeks] RE:Google Interview Question-Snake and Ladder Design

2010-09-14 Thread ankur aggarwal
@bittuu write your algo then code On Tue, Sep 14, 2010 at 1:36 PM, bittu shashank7andr...@gmail.com wrote: #includestdlib.h #includestdio.h #includemath.h #includeconio.h int turn, square; long game, totalgames; int seed; int chutehit[10], ladderhit[9]; float RunningTurnTotal;

Re: [algogeeks] Yahoo!!!! Puzzle

2010-09-14 Thread Terence
No coding at all. 1) Take out another A pill from the bottle; 2) Split each of the 4 pills into two equal halves, and take one half of echo pill. 3) Collect the other half of the 4 pills for next time. On 2010-9-14 17:22, bittu wrote: You are on a strict medical regimen that requires you to

Re: [algogeeks] clear screen in mysql

2010-09-14 Thread SHRISH MISHRA
http://lmgtfy.com/?q=how+to+clear+screen+in+mysql On Tue, Sep 14, 2010 at 4:48 PM, Ayush Mittal ayushmittal2...@gmail.com wrote: thanks man bt i hve searched a lot bt couln't find it...if u could help me plz...? On Tue, Sep 14, 2010 at 4:27 PM, Rohit Saraf

Re: [algogeeks] Yahoo!!!! Puzzle

2010-09-14 Thread Sathaiah Dontula
How_to_Ace_the_Brainteaser_Interview.pdf find this book, this has good number of puzzles. Thanks, Sathaiah Dontula On Tue, Sep 14, 2010 at 3:01 PM, vishal raja vishal.ge...@gmail.com wrote: take out that one A pill that's there in the jar. take the half of all the four pills, that's how u'll

Re: [algogeeks] clear screen in mysql

2010-09-14 Thread Chakravarthi Muppalla
+1 On Tue, Sep 14, 2010 at 4:27 PM, Rohit Saraf rohit.kumar.sa...@gmail.comwrote: well i just wanted u to know that there is a very nice place called www.google,com where u can find many things. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks

Re: [algogeeks] Re: Given an array, find out if there exists a pair of nos. that adds up to a sum 'x'

2010-09-14 Thread TurksHead Education
A very nice explanation at http://www.rawkam.com/?p=345 On Tue, Sep 14, 2010 at 3:16 PM, soundar soundha...@gmail.com wrote: #include iostream #include cstring #include conio.h using namespace std; int main() { int n,a[30],temp[30],x; cin n; memset(temp,0,sizeof(temp));

Re: [algogeeks] Google Interview Question

2010-09-14 Thread TurksHead Education
Number of correctly matched pair of n parenthesis will be a catalan number Cn. You may want to see the application of catalan numbers at http://www.rawkam.com/?p=568 http://www.rawkam.com/?p=568 On Tue, Sep 14, 2010 at 8:27 PM, bittu shashank7andr...@gmail.com wrote: Write a function

[algogeeks] Re: Google Interview Question

2010-09-14 Thread Gene
You can approach this the same way you'd do it by hand. Build up the string of brackets left to right. For each position, you have a decision of either ( or ) bracket except for two constraints: (1) if you've already decided to use n left brackets, then you can't use a another left bracket and

[algogeeks] Amazon Question

2010-09-14 Thread bittu
Suppose you have a system that keeps track of thousands of users' contact information, including email address. This information is stored in plain text, on disk in a hierarchical directory structure (on a Unix operating system) organized by year, month, and day it was entered in the system.

[algogeeks] Google Interview Question

2010-09-14 Thread bittu
how to decrypt a dictionary and how multithreading can help make the process faster -- 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

Re: [algogeeks] Re: Google Interview Question-Snake and Ladder Design

2010-09-14 Thread siddharth srivastava
Hi On 14 September 2010 13:33, bittu shashank7andr...@gmail.com wrote: #includestdlib.h #includestdio.h #includemath.h #includeconio.h ///O(N^2) solution Does solution exits in O(n) or (nlogn)..? reply me sum1 git dis.. //i will post analysis of dsi

[algogeeks] Re: Amazon Question make confused !!!!!!!

2010-09-14 Thread Minotauraus
Actually the solution is unique. The middle part with the Ys is the same and therefore can be omitted out. Now you are left with 2 equations and 2 unknowns. I used time in minutes and I have x = 1.28, z = 0.30476 units (y can be found out). I guess the trick was 1. to write the equations that

[algogeeks] Re: Google Interview Question-Snake and Ladder Design

2010-09-14 Thread Minotauraus
And please stop posting the same thing twice. It's been happening for the past couple of days at least. @Question: I think you can use graphs and flood fill algo for this. Every possible move can be represented with an edge. Flood fill will help you figure out possible moves from you current

[algogeeks] Re: Write a program to arrange numbers from 1 to 16 such that the sum of two consecutive numbers is a perfect square

2010-09-14 Thread Minotauraus
I guess the problem could be modified for any 1..n where n is 2^m. so say 132 or 1...64 Try it out. It still works! The time complexity in this case is O(log n). On Sep 14, 6:02 am, Dave dave_and_da...@juno.com wrote: @Bittu: First, it makes no sense to say O(n) when n is fixed. Second, if

Re: [algogeeks] Re: Excellent Compilation of Interview Questions

2010-09-14 Thread TurksHead Education
for product companies like Microsoft, Google Adobe see http://www.rawkam.com/ On Sun, Sep 12, 2010 at 4:30 PM, aparichith vineelyalamar...@gmail.comwrote: Can any one tell me how to prepare for a good product development company with in 6 months time interval ? -- You received this

Re: [algogeeks] Excellent Compilation of Interview Questions

2010-09-14 Thread TurksHead Education
Shame on you.. you have copied the articles as it is from other sites. For example, the article http://www.cracktheinterview.org/2010/08/converting-a-tree-to-a-doubly-linked-list/; is an exact copy-paste from rawkam.com. So much so that the images still point to images of rawkam.com On Sat, Sep

[algogeeks] Re: Amazon Question make confused !!!!!!!

2010-09-14 Thread Gene
This isn't right. Dropping both y terms is the same as setting y to zero. The answer you get is correct, but there are many others as has been said. You could get a unique solution if the route were constrained to be monotonic (level and up or else level and down). On Sep 14, 4:28 pm,

Re: [algogeeks] Excellent Compilation of Interview Questions

2010-09-14 Thread saurabh singh
haha...no one knows now what was the true source of that solutionlot of stuff on same kind of problem is lying on web on tons of web-sitesthe only change in sol i can observe mostly is change in variable names :) On Tue, Sep 14, 2010 at 10:55 PM, TurksHead Education