@juver++ - could u plz elaborate..
--
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...@googlegroups.com.
For more
@Anirvana - In context to the XOR method u suggested, could u plz
explain why does it so happen.. ??
--
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
@ligerdave -
your algo will fail in the case the two arrays are:
hellostl
eeelexander
ans : hellostlexander
but according to ur method the answer would end up being
hellostleeelexander
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
@Dave -
Got it..!! thanks :)
--
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...@googlegroups.com.
For more
@ Mridul -
even I had the same confusion.. Wht dave says is not this..
He is considering one point at a time (say A) and checking the
maximum
number of points (say n) which have the same slope with A...
now wen he considers the next point (say B) and calculates slope with
B
for all other points
@ Shiv -
ur method will fail for
22
/ \
47 7
/
35
/\
17 45
\
90
here 17 35 45 90 shd be the tree
but in ur case as the first right is encountered (i.e. 45) the array
would reset and not consider 90.
--
You received this message because you are
@Nidhi -
I guess thats correct.. but am still not 100% sure about how the
explanation goes..
Actually printf() is a variable argument function and so the
acceptance of a value of a data type depends on the way it is defined
in the library..
and since %f if encountered in the string must be
Thanks :)
This is definitely a much better option than O(mn)
--
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
@Dave -
Although what u have posed is correct to an extent but this will also
include cases where the line joining the points are parallel and not
collinear
So we will have to impose a check for one of the points involved
in every two same slopes to be coincident.
Do correct me if i am wrong..
Thanks everyone for putting in ur efforts..
@lingerdave -
the array is not sorted..
@ Dave -
although the equations will ultimately solve the problem
but I guess it will get tedious and may also go out of bounds
in case of the 4th power equation..
As for the other method of placing the number
@Dave -
I have a doubt..
will we not incorporate the complexity we get for each while loop
within the for loop..??
Basically complexity 2n right..??
another n because while loop runs for each misplaced number.. right??
which we take as O(n).. Have I understood it the right way??
--
You received
Given a string,find the first un-repeated character in it?
Im getting O(n2) or O(mn)
Anyone with a solution of lower complexity..??
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
This modified code also works in exactly the same way..
The explanation I had given earlier is correct..
and holds for this code as well
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
Given an array of size n. It contains numbers in the range 1 to n.
Each number is present at least once except for 2 numbers.
Find the missing numbers.
I know of a solution using another array to store frequency of each
number..
But this holds for than 2 nums also..
So Is there any other solution
Hi every1..
I have understood wht the question demands
and also wht the 2D matrix u've used is doing
but I haven't been able to get the logic u guys have used (@Gene,
@Anand)
Could you please explain the logic..??
thanks :)
--
You received this message because you are subscribed to the Google
As far as I have understood.. Its basically that
once you give the input to t as float, that value is displayed for all
the printf functions except one
because of the %f modifier.. the %f modifier cannot accept x (int) as
a successful argument so it takes the
latest float value..
but in case of
@Amit - could u explain this with an example??
Do u mean the root node after inverting will have all the nodes to one
side??
--
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
17 matches
Mail list logo