Your Second approach is cool :)
On Wed, Dec 22, 2010 at 1:06 PM, juver++ avpostni...@gmail.com wrote:
Use bits manipulation tricks.
1. There is a way to remove a group of consecutive 1's from the right: A =
n (n + 1). Then check if A==0 then OK.
2. Second approach: B=n+1, check if B (B-1)
oh ya thanks now i got it
On Sun, Oct 24, 2010 at 9:54 AM, preetika tyagi preetikaty...@gmail.comwrote:
@Praveen- In this case, we will not ignore the right subtree of the root
(-10, which is less than zero) while traversing the tree.
On Sat, Oct 23, 2010 at 9:06 PM, Praveen Baskar
nishaant...@gmail.com wrote:
@Praveenit is not possible..in a BST *all the nodes* on the right
subtree are greater than the node :)
On Sat, Oct 16, 2010 at 3:26 PM, Praveen Baskar
praveen200...@gmail.comwrote:
@nishaanth: wat if the left child of the right node has a negative value
@nishaanth: wat if the left child of the right node has a negative value
On Thu, Oct 14, 2010 at 11:12 AM, nishaanth nishaant...@gmail.com wrote:
Just see the value of the node at every point, if it is greater than zero
dont recurse the right sub-tree, as simple as it is.print the node u
here is the hint
we can easily solve this
draw a triangle
draw a point is inside the triangle
connect the three vertices of the triangle with this point
you will get three small triangle
if ( area(big triangle)== sum of area of small triangles) then the point is
inside the triangle else it is
i think that we have to generate substrings from the given string such that
the similarity is above 50%
for eg.
word =foo
we have to generate the strings which must be greater than half of the given
string length
{fo,oo} (in this case)
after this operation we have the following string set