vamshi vijay vamshi1252@... writes:
at Sagar
See at level 4, 81 leaf nodes are possible, since in question it has been
given 28 leaf nodes, if i use just 10 nodes from level 3 (27 nodes), i can
get 28 leaves, but if u observe the remaining 17 nodes in the 3rd level are
also
.
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.
--
Yours affectionately,
Prashant Thorat
--
You received this message because you are subscribed to the Google Groups
In work case (ie max value of i,j and k ll be)
for(i=0;in;i++) //i=n
{
for(j=0;jn*n;j++) // j=i=n;
{
for(k=0;kn*n;k++) // k=j=i=n;
}
}
So Ans O(n^5)
-- Prashant Kulkarni
On Sat, Sep 10, 2011 at 12:05 PM, deepikaanand swinyanand...@gmail.comwrote:
ans : O(n^5)
inner
The Algorithm Design Manual By Steve S. Skiena
-- Prashant Kulkarni
On Tue, Sep 6, 2011 at 3:48 PM, Udit Gupta uditgupta...@gmail.com wrote:
Fundamentals of Computer Algorithms by Sartaj Sahni
On Tue, Sep 6, 2011 at 3:45 PM, Neha Gupta nehagup...@gmail.com wrote:
hey guys , do tell me
order can be stored but you need to remember the nulls
always
On Aug 29, 12:06 am, sagar pareek sagarpar...@gmail.com wrote:
level order traversal is best for this case :)
On Sun, Aug 28, 2011 at 11:53 PM, prashant thorat
prashantnit...@gmail.comwrote:
only preorder
to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Yours affectionately,
Prashant Thorat
Computer Science and Engg. Dept,
NIT Durgapur.
--
You received this message because you are subscribed to the Google Groups
but this case inorder traversal wont get back original tree
On Mon, Aug 29, 2011 at 3:09 PM, PRATEEK VERMA prateek...@gmail.com wrote:
@prashant
it is the same mid value as u calculate in binary search i.e. (lowest
index+highest index)/2
No matter whether it is 18 or 27,u gonna get almost
, 11:49 am, prashant thorat prashantnit...@gmail.com wrote:
@vikas :
you can use recursive approach to draw tree here we go:
6 4 3 5 7 8 11 12
1 ) 6 is root since 4 6 , 4 is left child of 6
2) find value which is more than 6 , so it is 7 in this case... hence 7
is
right child.
3
://groups.google.com/group/algogeeks?hl=en.
--
Yours affectionately,
Prashant Thorat
Computer Science and Engg. Dept,
NIT Durgapur.
--
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
) }
else
return;
}
On Sun, Aug 28, 2011 at 6:54 PM, Kamakshii Aggarwal
kamakshi...@gmail.comwrote:
what is the initial value of length that u r passing??
On Sun, Aug 28, 2011 at 6:47 PM, prashant thorat prashantnit...@gmail.com
wrote:
Hi, you can do this by recursion ,
printPath (int length
this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Yours affectionately,
Prashant Thorat
Computer Science and Engg. Dept,
NIT Durgapur.
--
You received this message because you
email to algogeeks@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.
--
Prashant Gupta
B.Tech Final Year
Computer Science and Engineering
NIT Trichy
hello
--
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...@googlegroups.com.
For more options, visit this group at
are printing its starting location so we will some
garbage value.
-- Prashant Kulkarni
On Mon, Aug 8, 2011 at 11:28 AM, Mohit Goel mohitgoel291...@gmail.comwrote:
can anyone one explain output of question 1.
--
You received this message because you are subscribed to the Google Groups
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
http://groups.google.com/group/algogeeks?hl=en.
--
Prashant Gupta
B.Tech
/group/algogeeks?hl=en.
--
Prashant Gupta
B.Tech Final Year
Computer Science and Engineering
NIT Trichy
Phone : +91 9894462744
--
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 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
http://groups.google.com/group/algogeeks?hl=en.
--
Prashant Gupta
B.Tech Final Year
Computer Science
to algogeeks@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.
--
Prashant Gupta
B.Tech Final Year
Computer Science and Engineering
NIT Trichy
Phone
for the execution. In that
case, you are asking compiler to allocate the memory but how much has to be
decided at run-time, so the compiler throws an error!
To make initializations, use compile time constants using const keyword or
macros or giving the size by yourself..
Thanks Regards,
Prashant Bhutani
If a compiler is compiling the code, simply means the compiler is
intelligent enough to know what you want to do. But the language
specifications, clearly explains not to do such things as these are
non-portable!!
Thanks Regards,
Prashant Bhutani
Senior Undergraduate
Computer Science
Well the macro definition should be #define sqrt(x) ((x)*(x)) to capture all
the possible scenarios!!
Thanks Regards,
Prashant Bhutani
Senior Undergraduate
Computer Science Engineering (B.Tech)
Institute of Technology - BHU (IT-BHU)
Varanasi-221005
On Sat, Jul 30, 2011 at 1:28 PM, arvind
Yeah, the comparison of two floats will be a problem as the behaviour is
undefined and depends on the machine architecture and compiler.
Thanks Regards,
Prashant Bhutani
Senior Undergraduate
Computer Science Engineering (B.Tech)
Institute of Technology - BHU (IT-BHU)
Varanasi-221005
On Fri
fffe is two's complement of 2.
Let me explain for fe and you can extrapolate it with other f's.
f =15, e =14. fe = 1110, ~fe = 0001, ~fe+1 = 0010 = 2 which
gives your answer.
Thanks Regards,
Prashant Bhutani
Senior Undergraduate
Computer Science Engineering (B.Tech)
Institute
to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Prashant Gupta
B.Tech Final Year
Computer Science and Engineering
NIT Trichy
Phone : +91 9894462744
--
You received this message because you are subscribed
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
http://groups.google.com/group/algogeeks?hl=en.
--
Prashant Gupta
B.Tech Final Year
Computer Science
hi,
for 1 question, use stack to display elements in reverse order.
can you elaborate your 2nd question ?
-- Prashant Kulkarni
On Thu, Jan 6, 2011 at 4:56 PM, dinesh bansal bansal...@gmail.com wrote:
Hi Guys,
There are some questions asked to me:
1. How do you print the SLL in reverse
4)look for 'z' in the list by considering all numbers as unsigned if u found
then check sign of that number it be opposite of 'z' if so return 1 else 0
[above steps is repeated for all elements]
*correct me if I am wrong*
--
Prashant Kulkarni
IISc Bangalore
On Wed, Dec 15, 2010 at 10:36 AM
we can use binary search algorithm to find the z
( sorting ll take O(n log n ) but it is very less compared to n^2 * log n )
-- Prashant Kulkarni
On Wed, Dec 15, 2010 at 3:32 PM, Ankur Murarka
ankur.murarka@gmail.comwrote:
wouldn't your algo take n^3 time as well given the fact
affectionately,
Prashant Thorat
Computer Science and Engg. Dept,
NIT Durgapur.
--
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
I think we can do XOR operation Over all numbers and result will contain
number which appeared only once.
Correct Me If I'm Wrong
-- Prashant Kulkarni
On Mon, Oct 4, 2010 at 3:17 PM, malli mallesh...@gmail.com wrote:
I have an array. All numbers in the array repeat twice except two
i think it is similar to finding max in a list O(n) or sorting algorithm
O(n log n)
-- Prashant Kulkarni
On Tue, Sep 28, 2010 at 11:33 PM, Rahul Singal rahulsinga...@gmail.comwrote:
A possible solution i can think is create a directed graph where each
vertex is a envelope and edges
of the linked list
-- Prashant Kulkarni
On Tue, Sep 28, 2010 at 10:54 PM, Divesh Dixit
dixit.coolfrog.div...@gmail.com wrote:
Given a singly-linked, find out (just give the basic logic) the mid
point of a single linked list in a single parse of the list. Assume
the program would be loaded
i think we can use recursion method to reverse the list
-- Prashant Kulkarni
On Sat, Aug 14, 2010 at 11:40 PM, Lokesh Agarwal lokesh...@gmail.comwrote:
how can you traverse from last without reversing it.
and there is no need fof using extra stack space.
--
You received this message
every printf statement wll return how many number of parameter/variable
print r printed so 2nd nested wll print number 1 n remaing two printf
statement wll print number of parameters are printed so total three 1's
.:)
-- Prashant Kulkarni
|| Lokaha Samastaha Sukhino Bhavanthu ||
|| Sarve Jana
)
here if (n-1) th is greater so it will return its value
-- Prashant Kulkarni
On Fri, Jun 4, 2010 at 7:13 PM, Raj N rajn...@gmail.com wrote:
int Max(int a[],int n)
{
int max;
if(n==1)
return a[0];
else
max=Max(a,n-1);
if(maxa[n
i think we can use sorting algorithm like insertion sort, in insertion sort
whenever we are putting the element into it's proper position we can check
whether this elements already exists don't put otherwise insert into into
it's proper position (element)
-- Prashant Kulkarni
|| Lokaha Samastaha
use BFS traversal method
-- Prashant Kulkarni
|| Lokaha Samastaha Sukhino Bhavanthu ||
|| Sarve Jana Sukhino Bhavanthu ||
On Wed, May 12, 2010 at 8:48 PM, vinayan c vinayan1...@gmail.com wrote:
Something like this
1
2 3
4
.
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.
--
Prashant Kulkarni
--
You received this message because you are subscribed
.
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.
--
Prashant Kulkarni
NITK
--
You received this message because you are subscribed
://groups.google.com/group/algogeeks?hl=en.
--
Prashant Kulkarni
--
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
.
--
Keep up with people you care about with Yahoo! India Mail. Learn
howhttp://in.rd.yahoo.com/tagline_galaxy_1/*http://in.overview.mail.yahoo.com/connectmore
.
--
Prashant Kulkarni
--~--~-~--~~~---~--~~
You received this message
of length n. find 2 number such that their differnce is
minimum.
--
Shishir Mittal
Ph: +91 9936 180 121
--
Regards,
Prashant Kulkarni
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm
, Nagendra Kumar nagendra@gmail.com wrote:
Given a set S of n distinct numbers and a positive integer k = n.
Determine the k numbers in S that are closest to the median of S.
Find an O(n) algorithm
--
Prashant Kulkarni
--~--~-~--~~~---~--~~
You
(brick edges must bepallarel to board edges)Thanks for helpRegards,Prashant Bhargava ***--***--***--***--***--***--***Plz do visitwww.hemantdesign.com/prashant
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Algorithm
PROTECTED] wrote: Sorry, you're wrong. Consider board of size N = 1, M = 5 and K = 2.
If you round down (N/K) then you have RESULT = 0. If you round up then you have 5. Also wrong. On 6/17/06, prashant bhargava [EMAIL PROTECTED]
wrote: if the question is complete then the answer shd' be (N/K) * M
from current node
start(x+n,y,TRAVERSED);
}
-- Smile, it's the second best thing you can do with your lips..By the way...the First thing is ur KISS :-)Prashant Bhargava--
www.excogitation.tkor
www.hemantdesign.com/prashant -- Smile
..
By the way...the First thing is ur KISS :-)Prashant Bhargava-- www.excogitation.tkor
www.hemantdesign.com/prashant
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post
Hello Friends.
I am Prashant and in First yr Engg--Computers
from Mumbai University. This may sound absurd for this group. I have an
aim of becoming one of the code jammers some day. I want to kno what
kind of programming skills (languages etc) one shld kno
48 matches
Mail list logo