[algogeeks] YAhoo PlacementPaper Friends

2012-12-02 Thread vamshi vijay
Hi Friends.. http://www.iitplacementpapers.com/2012/09/yahoo-campus-placement-papers-iits-nits.html -- With Regards, N.Vamshi Vijay, Mtech,CSE, IIT Kharagpur, Software Developer, Amazon India Development Center. --

[algogeeks] Yahoo

2012-08-08 Thread deepikaanand
Has anyone appeared for Yahoo recentlyplz tell the pattern of the paper -- 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/-/HL1OrE0BzxYJ. To post to this

Re: [algogeeks] yahoo qn

2011-09-28 Thread Shravan Kumar
How about using the order of words a key? 41325 is the key in you i/p . But this is so trivial, what we can do further is by encrypting this number On Wed, Sep 28, 2011 at 8:16 PM, Akash Mukherjee akash...@gmail.com wrote: hi dis is a qn posted in this grp itself Q3) Input - India is a great

Re: [algogeeks] yahoo qn

2011-09-28 Thread Akash Mukherjee
i am trying implement it by d shuffling of an array using random. On Wed, Sep 28, 2011 at 8:39 PM, Shravan Kumar shrava...@gmail.com wrote: How about using the order of words a key? 41325 is the key in you i/p . But this is so trivial, what we can do further is by encrypting this number

Re: [algogeeks] yahoo qn

2011-09-28 Thread Yogesh Yadav
Count number of space... Add 1 in it... that will be the no of words (say x)... now take two variables m n m=x/2 n =2 //if m is odd =3 //if m is even now store the values in array a[] as a[0]=m a[1]=(m+n)mod(x) a[2]=(m+n)mod(x) . .

[algogeeks] Yahoo

2011-09-25 Thread Aditya Virmani
neone who has appeared for yahoo recently? can ne one mention thr i/w / written rounds experience; they visited dce 3 days back also nit surathkal... -- 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] Yahoo

2011-09-25 Thread aditya kumar
I cleared the written round, the next round was coding round. We were asked to select any one problem out of three in 2 hrs. Q1) Given n number of xml files find a particular word and output should list all the files in current directory that contains that word. Q2) Given a hierarichal

[algogeeks] Yahoo! visit

2011-09-23 Thread vartika aggarwal
If anyone has any idea about the process of Ebay and/or Yahoo! (especially the questions asked), kindly post it here soon...it's visiting our campus on Sunday.. Please help! -- Regards Vartika Aggarwal Undergraduate Student IT Department NSIT, Dwarka -- You received this message because you

[algogeeks] yahoo question

2011-09-21 Thread abhishek
You have given a number 123456789 and two opearators + and *. You can use this two operators as many times u want. But you cant change the sequence of the number given there. The evaluated value is 2097. e.g. 1+2+345*6+7+8+9=2097 You have to find all the such expressions that evaluates and

Re: [algogeeks] yahoo question

2011-09-21 Thread Simran Singh
Hey.. Which college you from..?? And please do tell more about their process.. On Wed, Sep 21, 2011 at 7:31 PM, abhishek abhishek.ma...@gmail.com wrote: You have given a number 123456789 and two opearators + and *. You can use this two operators as many times u want. But you cant change the

Re: [algogeeks] yahoo question

2011-09-21 Thread shady
@simran you interested in solving problem or knowing the company recruitment process :P @abhishek looks like a dynamic programming problem one simple brute force solution will be to go recursively down and evaluate all expressions one by one On Wed, Sep 21, 2011 at 8:22 PM, Simran Singh

[algogeeks] yahoo campus placements

2011-09-14 Thread Akash Mukherjee
anybody has any yahoo campus placements papers/questions or tips etc. please share thanx in advance Akash -- 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] yahoo campus placements

2011-09-14 Thread rahul sharma
in which col it is cumingn wats is its procedure???waht is cgpa creteria? On Wed, Sep 14, 2011 at 6:26 PM, Akash Mukherjee akash...@gmail.com wrote: anybody has any yahoo campus placements papers/questions or tips etc. please share thanx in advance Akash -- You received this message

Re: [algogeeks] yahoo campus placements

2011-09-14 Thread Akash Mukherjee
bit mesra, cg 7...dunno nething else :( On Wed, Sep 14, 2011 at 3:00 PM, rahul sharma rahul23111...@gmail.comwrote: in which col it is cumingn wats is its procedure???waht is cgpa creteria? On Wed, Sep 14, 2011 at 6:26 PM, Akash Mukherjee akash...@gmail.comwrote: anybody has any yahoo

[algogeeks] yahoo

2011-09-09 Thread htross
hi everyone yahoo is coming to our college on september 30 what kind of questions will be asked in first round??? how to prepare for the first round -- 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] yahoo

2011-09-09 Thread Dheeraj Sharma
whch collg wat package? last time when it came to our collg..it has 4 questions on probablity..2-3 on c..and rest 15 20 on unix.. On Fri, Sep 9, 2011 at 3:40 PM, htross htb...@gmail.com wrote: hi everyone yahoo is coming to our college on september 30 what kind of questions will be asked in

[algogeeks] Yahoo Question

2011-07-10 Thread aanchal goyal
These are the various ways to swap 2 variables a) Using temporary Variable b) Usnig some Arithmentic operation c) Using bitwise XOR operation Explain which operation is better and Why? What if we need to swap -ive as well as floating point numbers also. -- Regards,* Aanchal Goyal*. -- You

Re: [algogeeks] Yahoo Question

2011-07-10 Thread vaibhav shukla
On Mon, Jul 11, 2011 at 1:51 AM, aanchal goyal goyal.aanch...@gmail.comwrote: These are the various ways to swap 2 variables a) Using temporary Variable always inefficient. using extra memory. b) Usnig some Arithmentic operation works for all numbers even floating points

Re: [algogeeks] Yahoo coding round question

2010-10-21 Thread Ashim Kapoor
I'm not sure what a 2 hash table is. Can you please explain ? On Tue, Oct 19, 2010 at 10:36 PM, MOHIT mohit...@gmail.com wrote: o(n) soln Lets say A is the array of length N. Create an array sum of length N and initialize it to 0. Create an array product of length N and initialize it

Re: [algogeeks] Yahoo coding round question

2010-10-20 Thread rahul patil
On Wed, Oct 20, 2010 at 5:11 AM, Kishen Das kishen@gmail.com wrote: In the below code the jth and kth inner for loops can be run in parallel making them O(1) and the entire thing O(n). for ( i=0 to i=N-1 ) { for ( j = i to j = 0 ) { why till 0? if S=107 , P= 210 and array is 10,

Re: [algogeeks] Yahoo coding round question

2010-10-20 Thread Lily Aldrin
@rahul the code doesn't fail for the case you gave. Please check. Also Kishen can you explain how is the complexity for two loops runninf in parallel equal to O(1). On Wed, Oct 20, 2010 at 3:06 PM, rahul patil rahul.deshmukhpa...@gmail.comwrote: On Wed, Oct 20, 2010 at 5:11 AM, Kishen Das

Re: [algogeeks] Yahoo coding round question

2010-10-20 Thread Saurabh Koar
@Kishen: Plz explain the complexity... On 10/20/10, Lily Aldrin lily.hi...@gmail.com wrote: @rahul the code doesn't fail for the case you gave. Please check. Also Kishen can you explain how is the complexity for two loops runninf in parallel equal to O(1). On Wed, Oct 20, 2010 at 3:06 PM,

Re: [algogeeks] Yahoo coding round question

2010-10-20 Thread Kishen Das
for ( i=0 to i=N-1 ) { // This inner for-loop can be run in parallel, as there is no dependency wrt previously computed values or the values at other indices. // you are just blindly adding the value at A[i] to all the elements of the sub-array B[0 - j ] and hence can be run in parallel. for ( j

Re: [algogeeks] Yahoo coding round question

2010-10-20 Thread Kishen Das
I am running my algorithm for your values - I will just show it for sum. Array B [ 0 0 0 0 0 ] i = 0 Array B [ 10 0 0 0 0 ] i = 1 Array B [7 -3 0 0 0 ] i = 2 Array B [ 9 -1 2 0 0 ] i=3 Array B [ 116 104 107 105 0 ] You will stop here and the answer is the range [ k to i ] which is A [ 2 to 3 ] I

[algogeeks] Yahoo coding round question

2010-10-19 Thread Abhishek Kumar Singh
Given an array of length N. How will you find the minimum length contiguous sub - array of whose sum is S and whose product is P . Here S and P will be given to you. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send

Re: [algogeeks] Yahoo coding round question

2010-10-19 Thread rahul patil
Does array consists of negative nos? On Tue, Oct 19, 2010 at 1:28 PM, Abhishek Kumar Singh iiita2007...@gmail.com wrote: Given an array of length N. How will you find the minimum length contiguous sub - array of whose sum is S and whose product is P . Here S and P will be given to you. --

Re: [algogeeks] Yahoo coding round question

2010-10-19 Thread Kishen Das
Lets say A is the array of length N. Create an array sum of length N and initialize it to 0. Create an array product of length N and initialize it to 1. for ( i=0 to i=N-1 ) { for ( j = i to j = 0 ) { sum[j] = sum[j] + A[ i] product[j]= product[j] * A [i] } for( k=0 to k= i ) if ( sum[k] == S

Re: [algogeeks] Yahoo coding round question

2010-10-19 Thread abhishek singh
@ Rahul patil ofcourse array may have negative or positive integers @ Kishen both O(n) and O(n logn) solutions was asked in this yahoo coding round question On Tue, Oct 19, 2010 at 1:28 PM, Abhishek Kumar Singh iiita2007...@gmail.com wrote: Given an array of length N. How will you find the

Re: [algogeeks] Yahoo coding round question

2010-10-19 Thread Kishen Das
In the below code the jth and kth inner for loops can be run in parallel making them O(1) and the entire thing O(n). for ( i=0 to i=N-1 ) { for ( j = i to j = 0 ) { sum[j] += A[ i] product[j] *= A [ i] } for( k=0 to k= i ) if ( sum[k] == S and product[k] == P ) { Answer is the sub array A[k to

Re: [algogeeks] Yahoo coding round question

2010-10-19 Thread MOHIT ....
o(n) soln Lets say A is the array of length N. Create an array sum of length N and initialize it to 0. Create an array product of length N and initialize it to 1. now sum[i]=sum[i-1]+A[i]; sum[0]=A[0]; product[i]=product[i-1]+A[I]product[0]=A[0]; make a two hash table for

[algogeeks] [Yahoo]Implementing Orkut Functionality

2010-10-02 Thread amit
if you click on any orkut member's name you will notice the relationship graph for both of you indicating through whom you are interconnected or in certain cases you won't get this path. if you have to propose algorithm what would be the one ... -- You received this message because you are

[algogeeks] Yahoo Interview Question for Software Engineer/Developer about Algorithms

2010-09-18 Thread bittu
if you click on any orkut member's name you will notice the relationship graph for both of you indicating through whom you are interconnected or in certain cases you won't get this path. if you have to propose algorithm what would be the one ...breadth first or depth first traversal with some

[algogeeks] Yahoo!!!! Question Orkut.....tough One

2010-09-17 Thread bittu
if you click on any orkut member's name you will notice the relationship graph for both of you indicating through whom you are interconnected or in certain cases you won't get this path. if you have to propose algorithm what would be the one ... breadth first or depth first traversal with some

Re: [algogeeks] Yahoo!!!! Question Orkut.....tough One

2010-09-17 Thread saurabh singh
u need to find out the subset of connections associated with ur profile and that person's profile. using hashtable the problem will be solved.. On Sat, Sep 18, 2010 at 2:44 AM, bittu shashank7andr...@gmail.com wrote: if you click on any orkut member's name you will notice the relationship

Re: [algogeeks] Yahoo!!!! Puzzle

2010-09-15 Thread jaladhi dave
This looked like a variant of the socks problem :) On Tue, Sep 14, 2010 at 5:20 PM, Sathaiah Dontula don.sat...@gmail.comwrote: 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

[algogeeks] Yahoo Question

2010-09-15 Thread bittu
You are given k sorted lists with total n inputs in all the lists devise a algorithm to merge them into one single sorted list in O(n logk) Regard's Shashank Mani Narayan Don't Be Evil U Can Earn While U learn Computer Science Engineering Birla Institute of Technology,Mesra Cell No.

Re: [algogeeks] Yahoo Question

2010-09-15 Thread Rahul Singal
1. Take single element from each list . Put it in array maintaining min heap property , 2. Copy the lowest element ( O(1) ) from the heap to the single sorted list thand delete the element from heap. 3. Insert a new element into the heap ( O(logk) ) from list belonging to the deleted element . 4.

Re: [algogeeks] Yahoo Question

2010-09-15 Thread Chonku
Use k way merging On Wed, Sep 15, 2010 at 3:30 PM, bittu shashank7andr...@gmail.com wrote: You are given k sorted lists with total n inputs in all the lists devise a algorithm to merge them into one single sorted list in O(n logk) Regard's Shashank Mani Narayan Don't Be Evil U Can Earn

Re: [algogeeks] Yahoo Question

2010-09-15 Thread ankur aggarwal
use heap.. k node min / max heap. On Wed, Sep 15, 2010 at 3:30 PM, bittu shashank7andr...@gmail.com wrote: You are given k sorted lists with total n inputs in all the lists devise a algorithm to merge them into one single sorted list in O(n logk) Regard's Shashank Mani Narayan Don't Be

[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.

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

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] 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] Yahoo Question:Greatest Sub-sequential sum

2010-09-11 Thread ashita dadlani
@ashish: what if the array is {-2,3,4,17,-8,9}? On Wed, Sep 8, 2010 at 8:52 AM, Anand anandut2...@gmail.com wrote: Maximum Value Contiguous Subsequence problem in O(n). http://codepad.org/BhYxSlp4 On Tue, Sep 7, 2010 at 2:40 PM, ashish agarwal ashish.cooldude...@gmail.com wrote:

Re: [algogeeks] Yahoo Question:Greatest Sub-sequential sum

2010-09-11 Thread ashita dadlani
@anand: the maximum sum obtained from your solution is correct. However,the subarray printed is not correct for the following case: {-2,3,4,17,-8} -8 is also getting printed which is not a part of thw subsequence. On Sat, Sep 11, 2010 at 2:00 PM, ashita dadlani ash@gmail.com wrote: @ashish:

Re: [algogeeks] Yahoo Question:Greatest Sub-sequential sum

2010-09-11 Thread ashita dadlani
http://codepad.org/Jui20xme http://codepad.org/Jui20xmea little modification over anand's code. On Sat, Sep 11, 2010 at 2:33 PM, ashita dadlani ash@gmail.com wrote: @anand: the maximum sum obtained from your solution is correct. However,the subarray printed is not correct for the

Re: [algogeeks] Yahoo Question:Greatest Sub-sequential sum

2010-09-11 Thread ashish agarwal
@ashita I think its working fine for this seq also i=1 and j=5 and sum =25 {3,4,17,-8,9} correct me On Sat, Sep 11, 2010 at 2:16 AM, ashita dadlani ash@gmail.com wrote: http://codepad.org/Jui20xme http://codepad.org/Jui20xmea little modification over anand's code. On Sat, Sep 11, 2010

Re: [algogeeks] Yahoo Question:Greatest Sub-sequential sum

2010-09-07 Thread Yan Wang
There is my O(N) complex solution, where N is the length of the given array a[1...N]. Step1. sum[0] = 0, minima_index = 0, left = 0, right = 0, k = 1. Step2. sum[k] = sum[k - 1] + a[k]. Step3. If (sum[k] sum[minima_index]) then minima_index = k. Step4. If (sum[k] - sum[minima_index] sum[right]

Re: [algogeeks] Yahoo Question:Greatest Sub-sequential sum

2010-09-07 Thread Sahana Gururaj
In the else if condition, the increment of the end index i should be i=j+1, not i=j+i; Otherwise the algo is right, follows the principles of Kadane's algo : http://en.wikipedia.org/wiki/Maximum_subarray_problem#Kadane.27s_algorithm On Mon, Sep 6, 2010 at 3:50 PM, ashish agarwal

Re: [algogeeks] Yahoo Question:Greatest Sub-sequential sum

2010-09-07 Thread ashish agarwal
yeah..it will be i=j+1; it was misprinted On Tue, Sep 7, 2010 at 10:57 AM, Sahana Gururaj sahan...@gmail.com wrote: In the else if condition, the increment of the end index i should be i=j+1, not i=j+i; Otherwise the algo is right, follows the principles of Kadane's algo :

Re: [algogeeks] Yahoo Question:Greatest Sub-sequential sum

2010-09-07 Thread Anand
Maximum Value Contiguous Subsequence problem in O(n). http://codepad.org/BhYxSlp4 On Tue, Sep 7, 2010 at 2:40 PM, ashish agarwal ashish.cooldude...@gmail.com wrote: yeah..it will be i=j+1; it was misprinted On Tue, Sep 7, 2010 at 10:57 AM, Sahana Gururaj sahan...@gmail.comwrote: In the

[algogeeks] Yahoo Question:Greatest Sub-sequential sum

2010-09-06 Thread bittu
Given a sequence of integers, find a continuous subsequence which maximizes the sum of its elements, that is, the elements of no other single subsequence add up to a value larger than this one. An empty subsequence is considered to have the sum 0; thus if all elements are negative, the result must

Re: [algogeeks] Yahoo Question:Greatest Sub-sequential sum

2010-09-06 Thread ashish agarwal
int max=0,sum=0,begin=0,end=0,i=0; for(int j=0 to n){ sum+=a[j]; if(maxsum){ max=sum; begin=i; end=j; } else if(sum0){ i=j+i; sum=0; } return sum; i will tell the starting index and j will tell ending index; o(n); correct me if i am wrong On Mon, Sep 6, 2010 at 1:42 PM, bittu

[algogeeks] Yahoo

2010-07-04 Thread Piyush Verma
In a village in each family they give birth to children till they get a boy. IF girl child they try again. What is the ratio of boys to girls. -- 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] Yahoo

2010-07-04 Thread Amit Jaspal
it will be 1:1 On Sun, Jul 4, 2010 at 4:50 PM, Jitendra Kushwaha jitendra.th...@gmail.comwrote: it will be half... On Sun, Jul 4, 2010 at 4:18 PM, Piyush Verma 114piy...@gmail.com wrote: In a village in each family they give birth to children till they get a boy. IF girl child they try

Re: [algogeeks] Yahoo

2010-07-04 Thread jalaj jaiswal
yeah 1:1 On Sun, Jul 4, 2010 at 4:57 PM, Amit Jaspal amitjaspal...@gmail.com wrote: it will be 1:1 On Sun, Jul 4, 2010 at 4:50 PM, Jitendra Kushwaha jitendra.th...@gmail.com wrote: it will be half... On Sun, Jul 4, 2010 at 4:18 PM, Piyush Verma 114piy...@gmail.com wrote: In a

Re: [algogeeks] Yahoo

2010-07-04 Thread ashish agarwal
it will be 1:1 because probability of guy is 1/2+1/2*1/2+1/2*1/2*1/2.=1 and girls and boys has same probability On Sun, Jul 4, 2010 at 6:00 AM, jalaj jaiswal jalaj.jaiswa...@gmail.comwrote: yeah 1:1 On Sun, Jul 4, 2010 at 4:57 PM, Amit Jaspal amitjaspal...@gmail.comwrote: it will be

Re: [algogeeks] yahoo!!!

2010-07-02 Thread Amir hossein Shahriari
the rank of median in the merged list of the two lists is (N1+N2)/2 so if it's rank in list A is i and it's rank in list B is j then i+j=(N1+N2)/2 (it's rank in the list that it does not belong is i when A[i]medianA[i+1] ) we do an changed binary search as follows: pick the middle element of A

[algogeeks] Yahoo coding round question

2010-05-08 Thread Jitendra Kushwaha
Find the longest common subsequence of given N strings each having length between 0 to M. Can anybody give a good approach to the solutions -- 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] Yahoo coding round question

2010-05-08 Thread sharad kumar
pls check cormen i think thats most efficicent ...check under DP chapter On Sat, May 8, 2010 at 2:30 PM, Jitendra Kushwaha jitendra.th...@gmail.comwrote: Find the longest common subsequence of given N strings each having length between 0 to M. Can anybody give a good approach to the

Re: [algogeeks] Yahoo coding round question

2010-05-08 Thread Mario Ynocente Castro
I don't think DP is a good strategy for the N strings case 2010/5/8 sharad kumar aryansmit3...@gmail.com pls check cormen i think thats most efficicent ...check under DP chapter On Sat, May 8, 2010 at 2:30 PM, Jitendra Kushwaha jitendra.th...@gmail.com wrote: Find the longest common