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
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 wrote:
>
> On Sat, May 11, 2013 at 10:29 AM, Aman Jain wrote:
>
>> 2. from this no*de u*, again apply* dfs* to find longe
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 wrote:
> Do you mean the middle posit
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 un
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
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 wrote:
> if one can explin me this i think this problem will get solved
>
>
> th
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 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
> occ
T even .
thanks
--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=dAyDi1aa40E&feature=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
HI guys , need to know what is a company commvault ,. Is that a good comp
and is it a good pay master
--
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@googlegrou
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 more options, visit this group at
> htt
@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 wrote:
> @ MAC , i think it was not right to inspect common nodes in different
>
or two loops sharing common edge/s??
>
>
> On Wed, Aug 31, 2011 at 8:46 PM, MAC 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 verte
. 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 becaus
com> 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 wrote:
> > Use NTL.
> > Don
> >
> > On Aug 24, 12:43 pm, MAC wrote:
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
s@googlegroups.com.
> To unsubscribe from this group, send email 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
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 wrote:
> do u have any info on its pay scale etc ? if possibel plea
>
>
> On Sun, Aug 21, 2011 at 9:15 PM, cdr wrote:
>
>> Plz tell me abt the written test
scr...@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 al
thanks .. any os specific ??
--mac
On Sun, Aug 21, 2011 at 7:57 PM, Navneet wrote:
> geeksforgeeks.org
> careercup.com
>
> On Aug 21, 7:13 pm, MAC wrote:
> > can anyone suggest good link to review Algos and OS concepts
> >
> > --
> > thanks
> > --mac
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, sen
@Sanjay awesome aproach frd ..
--mac
On Sat, Aug 20, 2011 at 3:39 PM, Sanjay Rajpal 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
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
wrote:
> @mac: just to clear my understanding, u need to print paths that sum up
. Any suggestion ???
--mac
On Fri, Aug 19, 2011 at 1:20 PM, MAC wrote:
>
> can someone explain how to solve this:
>
> You are given a binary tree in which each node contains a value. Design an
> algorithm to print all paths which sum up to that value. Note that it can be
> any pat
came up and algo &¬ 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
algo
.
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 are
minimize the difference.
>
> Thanks & Regards,
> Anantha Krishnan
>
>
> On Thu, Aug 18, 2011 at 1:01 PM, MAC 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
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
any suggestion on how to approach this problem ??
On Wed, Aug 17, 2011 at 10:37 PM, MAC 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}
>
email 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 po
, 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, sen
Tue, Aug 16, 2011 at 2:34 PM, sukran dhawan wrote:
>
>> what is the complexity in which it has been done ?
>>
>> On Tue, Aug 16, 2011 at 1:41 PM, MAC wrote:
>>
>>>
>>> Given an array of integers. Each number in the array repeats ODD number
>>&g
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
ire.com/?ej74twjczauidil
>>
>> On Tue, Aug 16, 2011 at 9:57 AM, MAC wrote:
>>
>>> does anyone has sumitabha das unix ebook for unix ?
>>>
>>> --
>>> thanks
>>> --mac
>>>
>>> --
>>> You received this me
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
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 g
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 wrote:
> thanks guys .. so lets take the question we had "design a car rental
> system" .. so the intervie
i do next
--mac
On Fri, Aug 12, 2011 at 1:11 PM, keyan karthi wrote:
> First thing tat should come to your mind s ' requirements ' ask him
> wat de requirements are. He will expect tat..
>
> On 8/12/11, MAC wrote:
> > Hi guys ,
> >
> > Can anyone help m
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
any priorities 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
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
send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email 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 messag
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 to
>> In your 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 wrote:
>> > you are given a bst where each node has a int value , parent pointer ,
>> and
&g
.
5
1 10
0 2 6 11
so to find 16 we say it is 1 to 5 to 10
--
thanks
--mac
--
You received this message because you are subscribed to the Google Groups
o go
left .. till u find 5 or less than 5
hope this helps
regards
--mac
On Sat, Dec 25, 2010 at 8:25 AM, yq Zhang 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 c
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
> 00011
> 0
> 1
>
> 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 G
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
algogeek
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
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, sen
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
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
e have fun(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
wrote:
> *1st programe give output:199 but 2nd give Segmentation fault why* onle
> change in return
&
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
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,
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
algogeek
...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
algogeek
@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 wrote:
> Traverse the matrix in z-order, or hilbert-order. This is a heuristic-
> algo.
>
> On Oct 4, 1:51 pm, mac adobe wrote:
> > Given a b
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, sen
w many times the element occurs and the list gives
> the elements.
>
>
> On Sun, Oct 3, 2010 at 11:22 AM, sharad kumar wrote:
>
>> it will take same amount of memory nakey value is element and vaule is
>> the amount of times element occurs.
>>
>>
>>
i think hash map takes lots of memory ... please correct me if i am wrong
here ..
anyways its a soluton but i would like to have a different solution .. :)
--mac
On Sun, Oct 3, 2010 at 10:55 AM, sharad kumar wrote:
> cant u use a hash map buddy???
>
> On Sun, Oct 3, 2010 at 10:3
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...@googlegrou
@ Yang .. can you please share book authors so that i can refer .. .
Please share some insight also .. it will help me understand it.
--mac
On Fri, Oct 1, 2010 at 4:01 PM, mac adobe wrote:
> correcting ... Its minimum numbers of ladders required
>
>
> Please suggest how you th
ladders your require .
--mac
On Fri, Oct 1, 2010 at 3:56 PM, Yan Wang wrote:
> I think your question should be to find the minimum number of ladders
> required.
>
> This is a very classic Greedy-Algorithm solved problem. Please refer
> to Chapter 4 of book "Algorithm Design
ladder should remain attached to the plane. So if plane lands at 3 am and
fly at 3 pm , we need a ladder from 3 am to 3 pm dedicated for that plane.
Given land_time and fly_time of multiple planes in a day , find the maximum
number of ladders your require .
--mac
--
You received this message
@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 wrote:
> No parody .. that would be another doubt :(
>
>
> On Sat, Sep 25
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
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
al
70 matches
Mail list logo