@oppilas
char *ptr=hello
in this case the string becomes constant but not the ptr, you can do this.
char *ptr=hello;
char arr[]=hi;
ptr[0]=B; //not work
ptr=arr; //work
arr[0]=H; //work
ptr[0]=N; //work
Only string Hello becomes constant, it cant be changed.
Read - const char *ptr , char const
@Sanket: You are wrong. Check the loops again!
--
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/-/ifxkh_x5o0EJ.
To post to this group, send email to
yes it is matching points between 2 different pictures of the same object
taken in different environments..not different views of the same object
On Sun, Jun 26, 2011 at 5:57 PM, sukhmeet singh sukhmeet2...@gmail.comwrote:
YES.. we need to have 2 shots.. !!
u said u had some matching points
plz recommend me some good sites for OS interview questions...
Thanx in advance
--
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
HI
Do an inorder traversal on that bst n form a sorted array...then u can
search for that 2 elements in O(n)
On Mon, Jun 27, 2011 at 2:01 PM, manish kapur manishkapur.n...@gmail.comwrote:
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
do inorder traversal of tree and store values in an array.
Now find pairs by applying binary search on array..
On 6/27/11, manish kapur manishkapur.n...@gmail.com wrote:
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this
WAP to sort an array of character strings on the basis of last
character of each string
eg:- {xxxc , yyya, zzzb} = {yyya , zzzb, xxxc}
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
One such resource
http://placementsindia.blogspot.com/search/label/Operating%20Systems
On Mon, Jun 27, 2011 at 2:01 PM, Nishant Mittal
mittal.nishan...@gmail.com wrote:
plz recommend me some good sites for OS interview questions...
Thanx in advance
--
You received this message because
@Bharath : Cud u plz explain how r u searching the elements in O(n) time?
Because if we use binary search, it will have O(n*log n ) worst case
time complexity. One way in which I think it cud be made O(n) is that
we can use a hash table, with a good hash function apart frm the
array. And then for
reverse all strings and then sort.
On Mon, Jun 27, 2011 at 2:28 PM, Nishant Mittal
mittal.nishan...@gmail.comwrote:
WAP to sort an array of character strings on the basis of last
character of each string
eg:- {xxxc , yyya, zzzb} = {yyya , zzzb, xxxc}
--
You received this message because
(for array sorted in ascending order)
take 2 indexes i and j pointing to 1st and last element of the array
respectively...
now if(arr[i]+arr[j] == x)
print(arr[i]);
print(arr[j];
else if(arr[i]+arr[j]x)
j--;
else
i++;
I think this should work...(i've not checked)
correct me if i m wrong
On
@ankit: no need to use hash table for that.
simply run two pointers one from 0 and second from n - 1.
On Mon, Jun 27, 2011 at 2:51 PM, ankit sambyal ankitsamb...@gmail.comwrote:
@Bharath : Cud u plz explain how r u searching the elements in O(n) time?
Because if we use binary search, it will
Instead of using an array...we can do this by converting the BST into a
doubly linked list...but this will definitely modify the BST..
On Mon, Jun 27, 2011 at 3:01 PM, varun pahwa varunpahwa2...@gmail.comwrote:
@ankit: no need to use hash table for that.
simply run two pointers one from 0 and
*Statement Riddle - 27 june
*
*
*
**
*'Ferari driver' easily beats the 'force indain driver' in a two care
race.How did Indian newspapers *
*truthfully report so to look as 'force indain drive' had outdone the
'ferari driver'
Think ??
*
*Update Your Answers at* : Click
if moderators are alive, can they ban him ?
On Mon, Jun 27, 2011 at 12:48 PM, Lavesh Rawat lavesh.ra...@gmail.comwrote:
*Statement Riddle - 27 june
*
*
*
**
*'Ferari driver' easily beats the 'force indain driver' in a two care
race.How did Indian newspapers *
*truthfully report so to
+1 to shady's post. Please ban him.
On Mon, Jun 27, 2011 at 5:32 PM, shady sinv...@gmail.com wrote:
if moderators are alive, can they ban him ?
On Mon, Jun 27, 2011 at 12:48 PM, Lavesh Rawat lavesh.ra...@gmail.comwrote:
*Statement Riddle - 27 june
*
*
*
**
*'Ferari driver' easily
i have added anton nomiste as the new moderator...
On Mon, Jun 27, 2011 at 5:36 PM, sharad kumar aryansmit3...@gmail.comwrote:
banned!!!
On Mon, Jun 27, 2011 at 5:32 PM, shady sinv...@gmail.com wrote:
if moderators are alive, can they ban him ?
On Mon, Jun 27, 2011 at 12:48 PM, Lavesh
Given a byte, write a code to swap every two bits. [Using bit
operators]
Eg: Input: 10 01 11 01 Output: 01 10 11 10
--
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
can anyone plz post the code for this problem
--
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
@Nishant: No need to store the data in an array. Do two inorder
traversals simultaneously. Let u and v be the current nodes of the two
traversals, respectively. If u + v x, then advance the v
traversal. If u + v x, advance the u traversal.
Dave
On Jun 27, 3:40 am, Nishant Mittal
y = ((x 0x55) 1) | ((x 1) 0x55).
Note, 0x55 = 01010101 in binary.
Dave
On Jun 27, 7:18 am, rShetty rajeevr...@gmail.com wrote:
Given a byte, write a code to swap every two bits. [Using bit
operators]
Eg: Input: 10 01 11 01 Output: 01 10 11 10
--
You received this message because you
Force indain driver finishes second in race. Ferari was next to last.
Dave
On Jun 27, 2:18 am, Lavesh Rawat lavesh.ra...@gmail.com wrote:
*Statement Riddle - 27 june
*
*
*
**
*'Ferari driver' easily beats the 'force indain driver' in a two care
race.How did Indian newspapers *
@Dave
i think your solution won't work
consider inorder traversal of a BST is 1 6 7 8 15 and x = 14
initially both u,v (1,1)
according to u your algorithm will proceed like
(1,1) - (1,6) - (1,7) - (1,8) - (1,15) - (6,15) - (15,15)
and clearly in second step of your solution if (u+v)
@ Dave How to think about the answer to the above question . I mean How do I
tackle such problems ?
On Mon, Jun 27, 2011 at 6:17 PM, Dave dave_and_da...@juno.com wrote:
y = ((x 0x55) 1) | ((x 1) 0x55).
Note, 0x55 = 01010101 in binary.
Dave
On Jun 27, 7:18 am, rShetty
Yep,I also want to know the same..
On Mon, Jun 27, 2011 at 6:23 PM, rajeev bharshetty rajeevr...@gmail.comwrote:
@ Dave How to think about the answer to the above question . I mean How do
I tackle such problems ?
On Mon, Jun 27, 2011 at 6:17 PM, Dave dave_and_da...@juno.com wrote:
y = ((x
@varun: where does the algo stops?
when the two pointer crosses over or both of them reaches other
opposite end.
On Mon, Jun 27, 2011 at 3:04 PM, Piyush Sinha ecstasy.piy...@gmail.comwrote:
Instead of using an array...we can do this by converting the BST into a
doubly linked
Hi swathi,
What do you mean exactly by the google resume book?
On Sun, Jun 26, 2011 at 10:50 PM, Swathi chukka.swa...@gmail.com wrote:
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
Here it is: http://arxiv.org/PS_cache/arxiv/pdf/0805/0805.1598v1.pdf
On Jun 27, 5:02 am, Ankit Sablok ankitsablok19091...@gmail.com
wrote:
Need a Better Algorithm
here is a trivial question we are given an array of 2n elements in the
form
{a1,a2,a3,..,an,b1,b2,b3b...bn}
we need to
It doesn't work. In your idea values of nodes represented by u and v always
increased, cause you are doing inorder traversal.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
@Sunny. Mea culpa. You are correct. Revised (and correct) algorithm.
Do two inorder traversals, one in the usual (descend to the left
before descendung to the right) direction and the other in the
reversed(descend to the right before descending to the left)
direction. Let u and r be the current
Yes, now it is fine enough :)
--
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/-/8z1hcl2hQskJ.
To post to this group, send email to algogeeks@googlegroups.com.
This book
http://www.amazon.com/gp/product/0470927623/ref=as_li_ss_tl?ie=UTF8tag=care01-20linkCode=as2camp=1789creative=390957creativeASIN=0470927623
Thanks,
swathi
On Mon, Jun 27, 2011 at 6:50 PM, Vivek Srivastava
srivastava.vivek1...@gmail.com wrote:
Hi swathi,
What do you mean exactly
Dave,
Can you provide the psuedo code for this..
Thanks,
Swathi
On Mon, Jun 27, 2011 at 7:30 PM, Dave dave_and_da...@juno.com wrote:
@Sunny. Mea culpa. You are correct. Revised (and correct) algorithm.
Do two inorder traversals, one in the usual (descend to the left
before descendung to the
Hello,
We have a hot opening for...
Job Title: C#.NET Developer
Location: Columbus, OH
Duration: 6+ Months
Must be onsite interview.
Job Profile:
These resources will be developing multiple applications.
Experience with C#, .NET, Agile, TFS and Java Scripts is a must.
Reversing a String without using a temporary variable ?
Rajeev N B
--
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
@ankit, sorry i was mistaken its O(nlogn) for searching the two elements...
On Mon, Jun 27, 2011 at 8:04 PM, Swathi chukka.swa...@gmail.com wrote:
Dave,
Can you provide the psuedo code for this..
Thanks,
Swathi
On Mon, Jun 27, 2011 at 7:30 PM, Dave dave_and_da...@juno.com wrote:
suppose k is the sum to be found.
@vaibhav: yes it will stop when crossing is there means (j must be greater
than i).initially sum = a[i] + a[j] (where i = 0 n j = n- 1) n we will
increase i when sum is less than k and decrease j when sum k.stop if sum
== k. and if no i , j found till j i. then
thanks a lot for the wonderful explanation :-)
On Mon, Jun 27, 2011 at 7:17 PM, Dave dave_and_da...@juno.com wrote:
@Rajeev and Piyush: Numbering the bits from the right starting with 0
as usual, you see that you need to move the even-numbered bits one bit
to the left and the odd-numbered
Do we really need to reverse? Can't we apply any normal sorting algo
like merge sort or quick sort and for the comparison part of it, use
the last characters of each string only?
On Jun 27, 4:21 am, varun pahwa varunpahwa2...@gmail.com wrote:
reverse all strings and then sort.
On Mon, Jun 27,
@Dave - Wouldn't your solution also become O(kn) where k = number of
bits in the number?
In this summation - O(n) + O(n/2) + O(n/4) + ...= O(n) - you would
have O(n) appearing 'k' times. Each entry is O(n/ 2^i) where 'i' is
the bit position from right to left, starting at 0. The range of 'i'
is
Can one of you provide some hints in solving this problem ?
On Sat, Jun 25, 2011 at 3:34 PM, kartik sachan kartik.sac...@gmail.comwrote:
@jitendra that's what i am asking forwhat algo i should
implement to get process in 1 sec?
--
You received this message because you are
@varun: Thanks...
On Mon, Jun 27, 2011 at 9:18 PM, varun pahwa varunpahwa2...@gmail.comwrote:
suppose k is the sum to be found.
@vaibhav: yes it will stop when crossing is there means (j must be greater
than i).initially sum = a[i] + a[j] (where i = 0 n j = n- 1) n we will
increase i when
hint is : go for counting ,not for shifting o(n). :P
On Mon, Jun 27, 2011 at 9:29 PM, pacific :-) pacific4...@gmail.com wrote:
Can one of you provide some hints in solving this problem ?
On Sat, Jun 25, 2011 at 3:34 PM, kartik sachan kartik.sac...@gmail.comwrote:
@jitendra that's what
That is true Dave. Since the numbers are random, we could very well
have that scenario. To reduce this possibility, we can reverse the
allocation - 1.5MB for the array and 500KB for the input. Since the
input is going to be read sequentially, we would need to swap only
after exhausting all the
this may be a reverse race, who comes last will win..
On Mon, Jun 27, 2011 at 6:22 PM, Dave dave_and_da...@juno.com wrote:
Force indain driver finishes second in race. Ferari was next to last.
Dave
On Jun 27, 2:18 am, Lavesh Rawat lavesh.ra...@gmail.com wrote:
*Statement Riddle - 27
@Mihir - Yea, I missed the semi-colon, got it now :-)
On Jun 27, 2:00 am, Mihir mihirmpa...@gmail.com wrote:
@Sanket: You are wrong. Check the loops again!
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
@Juver - I am getting Access denied for the pdf link you sent :(
On Jun 27, 8:48 am, juver++ avpostni...@gmail.com wrote:
Here it is:http://arxiv.org/PS_cache/arxiv/pdf/0805/0805.1598v1.pdf
On Jun 27, 5:02 am, Ankit Sablok ankitsablok19091...@gmail.com
wrote:
Need a Better Algorithm
#include stdio.h
#include stdlib.h
void revers(char *s)
{
if(*s)
{
revers(++s);
s--;
printf(%c ,*s);
}
}
int main(int argc, char *argv[])
{
char arr[]=string;
revers(arr);
system(PAUSE);
return 0;
}
will s
this code will only print, it will not store the reverse string.
On Mon, Jun 27, 2011 at 9:53 PM, Kamakshii Aggarwal
kamakshi...@gmail.com wrote:
#include stdio.h
#include stdlib.h
void revers(char *s)
{
if(*s)
{
revers(++s);
s--;
and yes, s will be stored in stack everytime you call the function,
so its a temp variable..
string reverse is a simple logic, just iterate i through 1 to n/2 and
swap the i to n-i
On Mon, Jun 27, 2011 at 10:06 PM, Vishal Thanki vishaltha...@gmail.com wrote:
this code will only print, it will
consider G as 1, B as 0
so actually its series of 1 and 0's
now consider any sequence GBGBBGGGBG will be represented as
1010011101
objective is to push all 1's at the right end.
all '10' pairs need to be swapped at the same time.
considering this take for ex 101
the number of swaps is equal to
and how will swap without using temp variable ?
On Mon, Jun 27, 2011 at 10:07 PM, Vishal Thanki vishaltha...@gmail.comwrote:
and yes, s will be stored in stack everytime you call the function,
so its a temp variable..
string reverse is a simple logic, just iterate i through 1 to n/2 and
@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 ?
On Mon, Jun 27, 2011 at 10:07 PM, Vishal Thanki vishaltha...@gmail.comwrote:
and yes, s will be stored
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 ?
@Dave Thank You very much :)
On Jun 27, 8:48 pm, piyush kapoor pkjee2...@gmail.com wrote:
thanks a lot for the wonderful explanation :-)
On Mon, Jun 27, 2011 at 7:17 PM, Dave dave_and_da...@juno.com wrote:
@Rajeev and Piyush: Numbering the bits from the right starting with 0
as
@radha: hw abt using a fixed size circular list?
On Sat, Jun 25, 2011 at 8:25 PM, radha krishnan
radhakrishnance...@gmail.com wrote:
simple!!
Stack:P
On Sat, Jun 25, 2011 at 8:11 PM, rShetty rajeevr...@gmail.com wrote:
Suggest the most efficient Data Structures and algorithms to
You asked the Most Efficient dude
On Mon, Jun 27, 2011 at 10:29 PM, vaibhav agarwal
vibhu.bitspil...@gmail.com wrote:
@radha: hw abt using a fixed size circular list?
On Sat, Jun 25, 2011 at 8:25 PM, radha krishnan
radhakrishnance...@gmail.com wrote:
simple!!
Stack:P
On Sat, Jun 25,
you are given a system of passing binary trees among 2 ppl
Step1: convert the tree to preorder and inorder strings
Step2:send those strings to the intended person
Step3:get back tree from the strings
whats your strategy of testing?write various test scenarios.
--
You received this message
@vishal : dont you think that , i is also a variable?
--
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
@radha k but i think we need to store the bottom of the stack for deleting
the last node in O(1).
as we can click the redo or undo fixed number of times
and we would need two stacks
is that ok.
On Mon, Jun 27, 2011 at 10:31 PM, radha krishnan
radhakrishnance...@gmail.com wrote:
You asked the
guys temporary variable means not to store string in another variable.
On Mon, Jun 27, 2011 at 10:37 PM, hary rathor harry.rat...@gmail.comwrote:
@vishal : dont you think that , i is also a variable?
--
You received this message because you are subscribed to the Google Groups
Algorithm
only ONE mouse ...consume each sample of bottles of bear with a difference
of one hour
and calculate time..
sry if is thr any stupidity in this answer..but i think it may be right
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
@saket - No
O(n) + O(n/2) + O(n/4)... = O(n)
sum of series
n+n/2+n/4+n/8 = 2n
On Mon, Jun 27, 2011 at 9:26 PM, Sanket vasa.san...@gmail.com wrote:
@Dave - Wouldn't your solution also become O(kn) where k = number of
bits in the number?
In this summation - O(n) +
@Bhavesh
NO there is No stupity
just a mistake in reading the question
mice die within 14 hrs.Not exactly 14 hours :)
3 is correct answer.
On Mon, Jun 27, 2011 at 10:51 PM, Bhavesh agrawal agr.bhav...@gmail.comwrote:
only ONE mouse ...consume each sample of bottles of bear with a
ok , yeah 3 is the correct answer ..
--
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
@Nishant: Here are a couple of O(n) alternatives, given that there are
a limited number of last characters and no requirement to break ties
in any particular way:
1. A counting sort.
2. Form a linked list of entries corresponding to each last character,
and then merge these lists in collating
HEY DUDE I AM NOT GETTING UR LOGIC AT ALL I THINK HOW U WILL SATISFY THIS
CASE GBGBBB
--
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
@Swathi: No. I think the high level description should be adequate for
you to write your own code or pseudocode, albeit recognizing that you
may have to look up how to do an inorder traversal using a stack
instead of recursion.
Dave
On Jun 27, 9:34 am, Swathi chukka.swa...@gmail.com wrote:
Dave,
I am unable to write code for this so i am asking your help.
Thanks,
Swathi
On Mon, Jun 27, 2011 at 11:28 PM, Dave dave_and_da...@juno.com wrote:
@Swathi: No. I think the high level description should be adequate for
you to write your own code or pseudocode, albeit recognizing that you
this solution according to sameer statement solution if there is any
problem then pls tell me . here string or char is not being
store anywhere
char * reverse(char *str,int i ,int j)
{
while(ij)
{
str[i]=str[i]^str[j];
str[j]=str[i]^str[j];
str[i]=str[i]^str[j];
i++;j--;
}
return str;
}
int
it works perfectly
On Mon, Jun 27, 2011 at 11:53 PM, hary rathor harry.rat...@gmail.comwrote:
this solution according to sameer statement solution if there is any
problem then pls tell me . here string or char is not being
store anywhere
char * reverse(char *str,int i ,int j)
{
anyone!!!
On Jun 23, 3:28 pm, Priyanshu priyanshuro...@gmail.com wrote:
You have 100 computers, connected with each other. Give the most efficient
way to design a web crawler, which will crawl most pages in least amount of
time.
Thanks,
Priyanshu.
--
You received this message because you
if i am design algo which specify to not use the extra memory then if i use
the streams .
then is it consider as a extra memory?
--
Harish Pranami
Master Of Computer Application ,
Deptt of computer Science,
north campus , university of delhi,
New Delhi pin no - 110007
--
You received this
very funny ! every one know this site swathi
--
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
how about converting the BST into a doubly linked list...but this will
definitely modify the BST..
On Mon, Jun 27, 2011 at 11:32 PM, Swathi chukka.swa...@gmail.com wrote:
Dave,
I am unable to write code for this so i am asking your help.
Thanks,
Swathi
On Mon, Jun 27, 2011 at 11:28 PM,
@kartik
yup frgt to mention the last case 1 followed by zero's in that case number
of iterations is the no. of trailing zeroes.
GBGBBB
will have four iterations
101000 = 1(one zero b/w two ones) + 3(last 1 followed by 3 zero's)
BGBGBB,BBGBGB,BBBGBG,GG
well logic is how hw mny jump of 1's u
@kartik also consider the case of GB the answer is 1 BG. ie
trailing G's left.
BGB leading B's left hence only one G followed by B therefore only one
iteration.
try out some cases u will find hw it wrks.
On Tue, Jun 28, 2011 at 12:42 AM, vaibhav agarwal
vibhu.bitspil...@gmail.com
+1 :P
On Tue, Jun 28, 2011 at 12:27 AM, hary rathor harry.rat...@gmail.com wrote:
very funny ! every one know this site swathi
--
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.
Hi,
Please find the following requirement and send me your consultant resume
with the following details.
Name:
Contact:
Current Location:
Relocation:
Rate:
Job Title : Jr QA Analysts
Duration:6 + months Contract
Location : Columbus OH
Rate : $26-30/hr on C2C all inc
**CANDIDATES
Hi,
Please find the following requirement and send me your consultant resume
with the following details.
Name:
Contact:
Current Location:
Relocation:
Rate:
Position : SAP Project Manager
Location : San Jose, CA
Duration : 6+ months Contract
*
*
*SAP PM with Finance modules experience + M+A
@Rizwan:
don't u think for the counting sort part, if u use 11 int array as it
is without copying values in the main array, it would run faster? And
later on, get the sum from the two 11 int arrays like I did. Although
m using a single buffer so m getting 0.01. -http://ideone.com/lsK8n
So, by
Conversation between two mathematicians: first : I have three
children. The product of their ages is 36 . If you sum their ages . it
is exactly same as my neighbor's door number on my left. The second
mathematician verifies the door number and says that the not
sufficient . Then the first says
1,6,6
On Tue, Jun 28, 2011 at 2:07 AM, amit the cool amitthecoo...@gmail.comwrote:
Conversation between two mathematicians: first : I have three
children. The product of their ages is 36 . If you sum their ages . it
is exactly same as my neighbor's door number on my left. The second
A chain is broken into three pieces of equal lengths containing 3
links each. It is taken to a back smith to join into a single
continuous one . How many links are to be opened to make it ?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To
@piyush..will u xplain plz.
by d way 2 sons cant hav d same age(hope they r nt twins)
On Tue, Jun 28, 2011 at 2:14 AM, Piyush Sinha ecstasy.piy...@gmail.comwrote:
1,6,6
On Tue, Jun 28, 2011 at 2:07 AM, amit the cool amitthecoo...@gmail.comwrote:
Conversation between two mathematicians:
Since the product of their ages is 36. So the possible combination of ages
may b: either
1 4 9 or
4 3 3
6 6 1
1 2 18
1 3 12
1 1 36
2 2 9
Now neighbor's door numbr gives the sum.. Here all gives uniq sum except
(sum=13)
So there will be doubt in either 6 6 1 or 2 2 9
Bt as mathematician said tat
Is it required that no two sons have the same age?
From my view, the clue my youngest is the youngest only defines the
requirement that the youngest one is unique, but he can still have two
older brothers of the same age. Please correct me if this is wrong.
Yanan Cao
On Mon, Jun 27, 2011 at
We just need to look the 3 set of number that multiply to 36...
the set can be as
(1,1,36),(1,2,18),(1,4,9)..(1,6,6),(1,3,12)..(2,2,9)
The catch here is we need not find the whole set...the second mathematician
can't guess their ages through their sum that means there are at least
two
On Tue, Jun 28, 2011 at 2:23 AM, amit the cool amitthecoo...@gmail.comwrote:
A chain is broken into three pieces of equal lengths containing 3
links each. It is taken to a back smith to join into a single
continuous one . How many links are to be opened to make it ?
--
You received
if( links can be melt and made into smaller links )
{
return 1;
}
else
{
return 2;
}
Yanan Cao
On Mon, Jun 27, 2011 at 4:09 PM, sourabh jakhar sourabhjak...@gmail.comwrote:
two
On Tue, Jun 28, 2011 at 2:23 AM, amit the cool amitthecoo...@gmail.comwrote:
A chain is broken into
how 2??
On Tue, Jun 28, 2011 at 2:40 AM, gmagog...@gmail.com gmagog...@gmail.comwrote:
if( links can be melt and made into smaller links )
{
return 1;
}
else
{
return 2;
}
Yanan Cao
On Mon, Jun 27, 2011 at 4:09 PM, sourabh jakhar
sourabhjak...@gmail.comwrote:
two
On
ok piyush..u r right.well done
On Tue, Jun 28, 2011 at 2:31 AM, Piyush Sinha ecstasy.piy...@gmail.comwrote:
We just need to look the 3 set of number that multiply to 36...
the set can be as
(1,1,36),(1,2,18),(1,4,9)..(1,6,6),(1,3,12)..(2,2,9)
The catch here is we need not
@Kamakshi.thnks.i dint realise that.
On Mon, Jun 27, 2011 at 11:04 PM, sunny agrawal sunny816.i...@gmail.comwrote:
@saket - No
O(n) + O(n/2) + O(n/4)... = O(n)
sum of series
n+n/2+n/4+n/8 = 2n
On Mon, Jun 27, 2011 at 9:26 PM, Sanket vasa.san...@gmail.com
http://anandtechblog.blogspot.com/2011/06/google-question-find-missing-number.html
On Mon, Jun 27, 2011 at 4:12 PM, aditya kumar
aditya.kumar130...@gmail.comwrote:
@Kamakshi.thnks.i dint realise that.
On Mon, Jun 27, 2011 at 11:04 PM, sunny agrawal
sunny816.i...@gmail.comwrote:
@saket -
*'Ferari driver' easily beats the 'force indain driver'.* *'force indain
drive' had outdone the 'ferari driver'. Now second statement says force
indian drive outdone the ferari driver (who is a man who must have
run/walked).*
On Mon, Jun 27, 2011 at 9:09 AM, Vishal Thanki
Hi,
The implementation is simple using 2 stacks, however we also need to make
sure that if queue length is say x, we are able to enqueue x elements. As
per my understanding, i could think of the solution using 4 stacks instead
of 2(1 for enqueue, 1 for dequeue, 1 aux for enqueue, 1 aux for
All the nine digits are arranged here so as to form four square numbers:
9 81 324 576
How would you put them together so as to form single smallest possible
square number and a single largest possible square number..
139854276 and 923187456 are the answers given
It was due to finish of oxygen inside the car.as it was sealed with
closed door and windows
On Sat, Jun 25, 2011 at 8:59 PM, sarveswaran v sarveswar...@gmail.comwrote:
she might have died because of heat generated inside the closed car
On Jun 24, 3:05 am, Lavesh Rawat
@Bhavesh: Check the squares of the integers from
ceiling(sqrt(123456789)) to floor(sqrt(987654321)) to see which ones
contain all nine nonzero digits. Since the sum of the nine nonzero
digits is 45, a satisfactory square will be a multiple of 9, and
therefore, we only need consider the squares of
Replying to myself, I should have printed i*i instead of i near the
end of the code:
printf(%i\n,i*i);
Dave
On Jun 27, 11:47 pm, Dave dave_and_da...@juno.com wrote:
@Bhavesh: Check the squares of the integers from
ceiling(sqrt(123456789)) to floor(sqrt(987654321)) to see which ones
contain
1 - 100 of 101 matches
Mail list logo