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.
--
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
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
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
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)
.
.
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
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
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
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
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
@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
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
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
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
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
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
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
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
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
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,
@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
@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,
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
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
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
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.
--
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
@ 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
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
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
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
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
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
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
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
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.
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.
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
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
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.
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.
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
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
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
@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:
@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:
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
@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
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]
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
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 :
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
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
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
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
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
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
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
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
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
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
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
62 matches
Mail list logo