How would one sort 1 billion integers. .. I gave external sorting answer
but he waned more .. What should i say ?
Asked me to tell him how would the problem change if total of 4 threads
are given. How would you solve ?
thanks
--mac
--
You received this message because you are subscribed
Given an infinite stream of integers with only k distinct integers, find
those distinct integers. How would you modify your solution if k is also
very large and cannot use hash table.
thanks
--mac
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
kindly explain visualizing a balanced BST as a graph and unable to
underdstand your point
thanks
--mac
On Fri, May 24, 2013 at 6:04 AM, Avi Dullu avi.du...@gmail.com wrote:
On Sat, May 11, 2013 at 10:29 AM, Aman Jain pureama...@gmail.com wrote:
2. from this no*de u*, again apply
that at push you store the
middle element with the top element as well .. this would mean push would
cease to be o(1)become o(n) .. . or is there some other trick ?
thanks
--mac
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To unsubscribe from
i meant the middle elemnt
so if 1 ,2,3 --top then 2 is mid value /..
accessing a middle element via the index is not right as it would mean you
are not using it as a stack , but as an array ..
thanks
--mac
On Wed, May 22, 2013 at 9:34 PM, Don dondod...@gmail.com wrote:
Do you mean
Given an acyclic graph. Give an algorithm to find the pair of nodes which
has the maximum distance between them, i.e. the maximum number of edges in
between them
any suggestion ?
thanks
--mac
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group
if one can explin me this i think this problem will get solved
thanks
--mac
On Wed, May 8, 2013 at 12:02 AM, MAC macatad...@gmail.com wrote:
I was asked this in recent amazon onsite interview and asked o write code
Given an Array of integers . N elements occur k times and one element
sry link was not pasted
http://stackoverflow.com/questions/7338070/finding-an-element-in-an-array-where-every-element-is-repeated-odd-number-of-tim
thanks
--mac
On Thu, May 9, 2013 at 12:40 AM, MAC macatad...@gmail.com wrote:
if one can explin me this i think this problem will get solved
--mac
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To unsubscribe from this group and stop receiving emails from it, send an email
to algogeeks+unsubscr...@googlegroups.com.
Hi guys ,
Got an interesting link to share :
http://www.youtube.com/watch?v=dAyDi1aa40Efeature=share
It talks about *Maths Problem: Connect the towns solution (Motorway Problem)
. * the solution finding by soap bubble is unique :)
--
thanks
--mac
--
You received this message because you
. a cycle within a cycle.
When i couldn't answer he asked how will you find strongly conected
components of a graph (since it was follow up it MIGHT be related to
solution but thought its good to share )
any thoughts on these 2 questions
--
thanks
--mac
--
You received this message because you
the planarity or two loops sharing common edge/s??
On Wed, Aug 31, 2011 at 8:46 PM, MAC macatad...@gmail.com wrote:
Q The question asked in interview of a startup : suppose you have a graph
as shown bellow : please see the attachment . The red dots are graph
vertexes ( you can see 1 vertex
@mohit : i disagree.. precisely bcoz of the reason you cited we can only
check common nodes between cycles and nothing else .. please correct me if i
am wrong
On Wed, Aug 31, 2011 at 9:34 PM, mohit verma mohit89m...@gmail.com wrote:
@ MAC , i think it was not right to inspect common nodes
any thoughts ? if we have link lists to represent very large integer numbers
how to implement multiply and devide operator
--
thanks
--mac
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks
wrote:
well if you store value in link list as a polynomial the you can do
multiplication as cross product.
eg. 345=3*100 + 4*10 + 5*1
On Wed, Aug 24, 2011 at 11:53 PM, Don dondod...@gmail.com wrote:
Use NTL.
Don
On Aug 24, 12:43 pm, MAC macatad...@gmail.com wrote:
any thoughts
can anyone suggest good link to review Algos and OS concepts
--
thanks
--mac
--
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
thanks .. any os specific ??
--mac
On Sun, Aug 21, 2011 at 7:57 PM, Navneet navneetn...@gmail.com wrote:
geeksforgeeks.org
careercup.com
On Aug 21, 7:13 pm, MAC macatad...@gmail.com wrote:
can anyone suggest good link to review Algos and OS concepts
--
thanks
--mac
--
You
options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
thanks
--mac
--
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
do u have any info on its pay scale etc ? if possible please share the same
.
On Sun, Aug 21, 2011 at 10:54 PM, MAC macatad...@gmail.com wrote:
do u have any info on its pay scale etc ? if possibel plea
On Sun, Aug 21, 2011 at 9:15 PM, cdr jay.kee...@gmail.com wrote:
Plz tell me abt
to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
thanks
--mac
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks
@Sanjay awesome aproach frd ..
--mac
On Sat, Aug 20, 2011 at 3:39 PM, Sanjay Rajpal srn...@gmail.com wrote:
My previous argument was wrong.
In the worst case, within a row, you may have to traverse the whole row,
and rest other rows for just testing. Therefore O(m+n).
But if we dont
came up and algo not just
another program)
--
thanks
--mac
--
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
10
20 30
4 66 7
now how do u make 60 = 20 +10+30
how do u make 36 :: 10 + 20 +6 30+6
On Fri, Aug 19, 2011 at 8:37 PM, Arun Vishwanathan
aaron.nar...@gmail.comwrote:
@mac: just to clear my understanding, u need to print paths
as per my understanding , you are increasing the minimum value so that it
reaches closer to the maximum others that we are not moving right now . Why
are you not moving the maximum instead ?
basically i need the reason why you are doing so ..
thanks
--mac;
On Thu, Aug 18, 2011 at 12:08 PM
the difference.
Thanks Regards,
Anantha Krishnan
On Thu, Aug 18, 2011 at 1:01 PM, MAC macatad...@gmail.com wrote:
as per my understanding , you are increasing the minimum value so that it
reaches closer to the maximum others that we are not moving right now . Why
are you not moving the maximum
.
abcdefcbcdfbcdefef has bcd and ef repeated multiple times but bcd count
trie apraoch is fine , but in interview difficult to code ,.so definately
some other solution is requested . please also give non-efficient , but easy
to code solution if any
--
thanks
--mac
--
You received this message because you
, and c = 14
if we had 4 arrays we would have wanted
|a-b| + |b-c| + |c-d| +|d-a| where a E A , bEB , cEC and dED to be minimum
...
--
thanks
--mac
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email
...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
thanks
--mac
--
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
any suggestion on how to approach this problem ??
On Wed, Aug 17, 2011 at 10:37 PM, MAC macatad...@gmail.com wrote:
Given n arrays, find n number such that sum of their differences is
minimum. For e.g. if there are three arrays
A = {4, 10, 15, 20}
B = {1, 13, 29}
C = {5, 14, 28}
find
/?ej74twjczauidil
On Tue, Aug 16, 2011 at 9:57 AM, MAC macatad...@gmail.com wrote:
does anyone has sumitabha das unix ebook for unix ?
--
thanks
--mac
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email
Given an array of integers. Each number in the array repeats ODD number of
times, but only 1 number repeated for EVEN number of times. Find that
number.
--
thanks
--mac
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group
, 2011 at 2:34 PM, sukran dhawan sukrandha...@gmail.comwrote:
what is the complexity in which it has been done ?
On Tue, Aug 16, 2011 at 1:41 PM, MAC macatad...@gmail.com wrote:
Given an array of integers. Each number in the array repeats ODD number
of times, but only 1 number repeated
can someone please suggest sample ques for de shaw ?? some lnk would help
--
thanks
--mac
--
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
does anyone has sumitabha das unix ebook for unix ?
--
thanks
--mac
--
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
thanks guys .. so lets take the question we had design a car rental
system .. so the interviewer can say , ok requirement is that you have a
pool of cars , people come and book a car for a particular time slot if
available . This is the most basic thing . so now what , what shd i do next
--mac
if someone can share one good solution , it would really help me. I am
unable to form the answer to these questions
--mac
On Fri, Aug 12, 2011 at 1:15 PM, MAC macatad...@gmail.com wrote:
thanks guys .. so lets take the question we had design a car rental
system .. so the interviewer can
Hi guys ,
Can anyone help me in understanding what is expected when some some one
asks you design a car rental system . Exactly what all is required to be
told to the interviewer .
--
thanks
--mac
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
from companies and
N preference lists from students.
As a placement coordinator , with all student preferences and with all
company preferences find the best matrix ie which student joins
which company .
--
thanks
--mac
--
You received this message because you are subscribed to the Google Groups
by companies then by algo explained as PROPOSE REJECT
ALGORITHM will assign std1 as amz , std2 as adb and std 3 as goog even
though it might not be correct .
i think i have misundesrtood this concept somehow .
Sharing some link will be helpful to me .
thanks
--mac
On Wed, Aug 3, 2011 at 2:28 PM, Ashish
...@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
thanks
--mac
--
You received this message because you
can someone please share a non-wiki link for tarjan algorithm for strongly
connected component . a video lecture link would be really nice ..
in case you have understanding of how it works , please share your thoughts
--
thanks
--mac
--
You received this message because you are subscribed
example for 16 one more path can be 0 1 5 10 as
well. Should algo return all the paths or just first one.
On Dec 26, 10:08 pm, MAC macatad...@gmail.com wrote:
you are given a bst where each node has a int value , parent pointer ,
and
left and right pointers , write a function to find a path
is 1 .. so we will say 2nd row has maximum 1
--
thanks
--mac
--
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
algogeeks+unsubscr
true is 0 false is 1 .. so we will say 2nd row has maximum 1 and 3rd row
has mximum 0
--
thanks
--mac
--
thanks
--mac
--
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
Given a Binary Matrix of 0's and 1's.
Write an algorithm to:
1) Print the largest Rectangular Sub-matrix with all 1's.
2)Print the largest Sub-matrix with all boundary elements 0.
Explain your whole algorithm with an example.
--
thanks
--mac
--
You received this message because you
.. till u find 5 or less than 5
hope this helps
regards
--mac
On Sat, Dec 25, 2010 at 8:25 AM, yq Zhang zhangyunq...@gmail.com wrote:
Suppose you have a matrix n*m. each column and row of the matrix is
already sorted. For example:
1,2,3
2,3,4
4,5,6
All 3 rows and 3 columns of above matrix
. The order
of of the matching elements is the same. For example, If, i'th row matches
with j'th column, and i'th row contains the elements - [1,4,5,6,3]. Then jth
column would also contain the elements - [1,4,5,6,3]. Given an n x n matrix
.
--
thanks
--mac
--
You received this message because you
how will u generate all valid paranthesis combinations ?
--
thanks
--mac
--
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
algogeeks
Given set of n points (Xi, Yi), write a function to find k nearest points
from origin.
--
thanks
--mac
--
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
You are given a array with rows sorted and column sorted. You have to print
entire array in sorted order .. any idea??
--
thanks
--mac
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge
you have an array of size n where first n/2 is sorted and the sencond half
is sorted . You need to sort the entire array inplace
Its second modification version is where first part is sorted and other is
NOT sorted . You need to make entire sorted .
--
thanks
--mac
--
You received this message
(200) .. This is now
recursive non changing call which will eat up stack space and hence cause
segenttaion fault
--mac
On Sat, Nov 13, 2010 at 10:23 PM, sudhir mishra
sudhir08.mis...@gmail.comwrote:
*1st programe give output:199 but 2nd give Segmentation fault why* onle
change in return
an array contain +ve and -ve element, find subarray whose sum is 0
--
thanks
--mac
--
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
Convert a max heap to min heap
--
thanks
--mac
--
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
algogeeks+unsubscr
...5+0+0
and so on for n = 4, 5...
--
thanks
--mac
--
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
algogeeks+unsubscr
is .. if such a matrix (square matrix does not
exist) find one with maximum 1s .
--
thanks
--mac
--
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
@chi .. can you please share what is this and how it resolves the issue at
hand ?
regards
--mac
On Mon, Oct 4, 2010 at 5:50 PM, Chi c...@linuxdna.com wrote:
Traverse the matrix in z-order, or hilbert-order. This is a heuristic-
algo.
On Oct 4, 1:51 pm, mac adobe macatad...@gmail.com wrote
with
numbers repearting 3 times ,
Can you extend the solution to create array_x with elements repeating x
times ?
thanks
--mac
--
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
How would you identify a binary search tree of maximum nodes in a binary
tree ?
--
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
No parody .. that would be another doubt :(
On Sat, Sep 25, 2010 at 11:03 PM, prodigy 1abhishekshu...@gmail.com wrote:
By maintaining a current maximum and a global maximum. You do know how
to verify a BT is BST .
http://pastebin.com/xwXXTEnP
On Sep 25, 9:04 pm, mac adobe macatad
@parody :..and how would that find me a maximum size BST .. ??
( for checking if this BT is BST i would do inorder traversal and see if it
is increasing )
On Sun, Sep 26, 2010 at 11:10 AM, mac adobe macatad...@gmail.com wrote:
No parody .. that would be another doubt :(
On Sat, Sep
61 matches
Mail list logo