Hi All,
Can anyone help me solving this problem ?
Given a non-empty array A consisting of N integers.
Find Max(j-i), s.t 0=i=jN and A[i]=A[j]
Here (i, j) is a Monotonic Pair, satisfying the above condition.
Space Complexity : O(n) Time Complexity: O(n)
--
Regards...
--
You received this
@rahul : It's fine solution, but can we check the root-data == n1 || n2
before calling function recursively, I think if we check this condition 1st
it will reduce unnecessary function calls.
Correct me if i am wrong?
Thanks,
Tushar Patil.
On Sun, Apr 21, 2013 at 10:26 PM, rahul sharma
It looks as if you have just pasted some Amazon interview questions on this
forum.
These are pretty common questions.
Try to come up with your own answers.
Do some research on google and previous posts on this forum. You'll get
answers to all of them.
If you have some idea and want to discuss
www.ams.jhu.edu/~castello/362/Handouts/*hungarian*.pdf
This PDF might be helpful
On Sunday, 16 September 2012 16:42:25 UTC+5:30, Rahul Kumar Patle wrote:
@atul: in Hungarian Algorithms works for minimization of cost where the
terminating condition is based on zeros.. in my problem what
For a large list of words,
At each location, look
for the character before/after that character in the word on opposite
sides of the initial location, and continue from there
Is it like:
frequency count of 'a' is smallest
'a' is in 2 words available and alpha
shall we check for 'v' near 'a';
we can assign minimum possible value, like negative infinity to the
diagonal elements.
Then they would not be considered for maximizing the sum.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
@srikanth
we can use segment trees to get sum of an interval
but there is another condition of sum of distinct numbers only. how can we
take that into account in a segment tree?
On Thursday, 6 September 2012 17:35:59 UTC+5:30, srikanth reddy malipatel
wrote:
post the logic not the code!
BTW
i think we cannot change the order of the characters
On Thursday, 19 July 2012 11:00:20 UTC+5:30, gobind hemb wrote:
String s is called *unique* if all the characters of s are different.
String s2 is *producible* from string s1, if we can remove some
characters of s1 to obtain s2.
String
this is interview street
post here freely
all the best
On Monday, 23 July 2012 19:40:12 UTC+5:30, rahul sharma wrote:
Guys i am having amazon support engg. test tonyt...90 min 27 questions
mcq...plz tell how to prepare and wats dis profyl???reply asap..and sory
for posting it in algogeeks
can you please elaborate on usage of stack to do it in O(1)?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/8jTvBVdzsmYJ.
To post to this group, send email
2
3
1 1 1
5
1 2 3 1 2
O/P should be:
0
6
Your O/P is
3
9
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/4pcRBMXAvXQJ.
To post to this group, send email
@amrit,@Pranav and others : Thanks a lot..
On Feb 15, 11:35 am, amrit harry dabbcomput...@gmail.com wrote:
@tushar
lower bound for sorting an array is
nlogn.http://www.bowdoin.edu/~ltoma/teaching/cs231/fall11/Lectures/6-moreso...
On Wed, Feb 15, 2012 at 11:16 AM, TUSHAR tusharkanta.r
Given an array of size N having numbers in the range 0 to k where
k=N, preprocess the array inplace and in linear time in such a way
that after preprocessing you should be able to return count of the
input element in O(1).
Please give some idea !!
Thanks..
--
You received this message
That means,,,we have to sort the array first in O(n).
Is there any way to sort the array inplace in O(n) ?
--
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
hello,
i want a good reference in web designing.can anyone plzz help me
with some good links, for reference..
plzz its urgent
Thanks in Advance
--
Tushar Kanta Rath,
Master In Computer Application
MNNIT, Allahabad
--
You received this message because you
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.
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tushicom...@gmail.com
Website
you were not given any essay during the written round?
and if you can get your friends to tell us what kind of puzzles were asked?
just a bit of info on that.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
://groups.google.com/group/algogeeks?hl=en.
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tushicom...@gmail.com
Website: www.jugadengg.com
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
end at 16
not 12 so that p2 starts at 8's multiple.
This is done by padding pointer by 4bytes in both I and II struct.
declarations.
Hope i made it clear...!
Thanks.
On 8/6/11, Tushar Bindal tushicom...@gmail.com wrote:
http://www.serc.iisc.ernet.in/ComputingFacilities
/group/algogeeks?hl=en.
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tushicom...@gmail.com
Website: www.jugadengg.com
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send
.
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tushicom...@gmail.com
Website: www.jugadengg.com
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks
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.
--
Tushar Bindal
Computer Engineering
Delhi College
...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tushicom...@gmail.com
Website: www.jugadengg.com
--
You received this message because you are subscribed
.
On 4 August 2011 11:00, TUSHAR tusharkanta.r...@gmail.com wrote:
#includestdio.h
main()
{
int j=4,i;
goto L;
for(i=0;ij;i++)
{
L:
printf(%d,j);
}
}
why this is giving infinite
I also think Radix sort..as it runs in linear
TCcorrect me If i m wrong.
And in terms of minimum time of memory access , which sort is best ??
. Does it means minimum swap procedures
--
You received this message because you are subscribed to the
1. Given an array of n-elements ? the 1st k -elements are in
descending order and k+1 to n elements are in
ascending order. give an efficient algo for searching an
element ?
2. Given an array of n-elements ? each element in the array is either
same or less by 1 or larger by 1 from
these are asked in CITRIX ? pl share possible logics..
--
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
:(
On Wed, Aug 3, 2011 at 3:44 PM, Dave dave_and_da...@juno.com
wrote:
@Tushar: For problem 1, do a binary search on elements 1 to k, and
if
no hit is found, do a binary search on elements k+1 to n.
For problem 2, suppose that you are searching the given array for
the
number 2
Shashank,
In C++ we implement it thru reference variables
in the function call we can say func(x);
in the definition we have, func(int a)
whatever changes we make to a in func() are reflected back in x in the
calling function
In C, we can simulate i t through pointers
call : func(x);
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.
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob
?hl=en.
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tushicom...@gmail.com
Website: www.jugadengg.com
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email
that is exactly what i thought
thanks for the clarification
--
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
#includestdio.h
main()
{
int j=4,i;
goto L;
for(i=0;ij;i++)
{
L:
printf(%d,j);
}
}
why this is giving infinite loop.Runtime error ?
--
You received this message
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.
--
Tushar Bindal
Computer Engineering
Delhi College
to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tushicom...@gmail.com
Website: www.jugadengg.com
--
You received this message
Suppose that our rabbits never die and that the female always
produces one new pair (one male, one female) *every month from the
second month on
*
@Priyanka
You have answer 288
I added 178 to it because I got the answer that 89 females would have given
birth in the last month.
Pls clarify.
Are
, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tushicom...@gmail.com
Website: www.jugadengg.com
--
You received this message because you are subscribed to the Google Groups
this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tushicom...@gmail.com
Website: www.jugadengg.com
nikhilgupta2...@gmail.comwrote:
For rabbits, answer is 256.
On Sat, Jul 30, 2011 at 8:33 PM, Tushar Bindal tushicom...@gmail.comwrote:
for rabbits answer would be different from cows as they give birth to a
pair at a time, so at any time odd number of rabbits won't be there
On Sat, Jul
to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tushicom...@gmail.com
Website: www.jugadengg.com
--
You received
If this is the case, we can follow this method:
take variables
1. dir = 1
2. st_col=0
3. end_col = n-1
4. st_row = 1
5. end_row = n-1
6. row = 0
7. col = n-1
8. noOfCellsVisited = 0
dir are as follows:
1 - left ro right
2 - top to bottom
3 - right to left
4 - bottom to top
row will keep account
There will be following changes to this
while(noOfCellsVisitedmn)
{
if(dir == 1)
{
for i = st_col to end_col
{ print arr[row][i]; noOfCellsVisited++}
dir++;
end_col--;
row = n-1-row;
}
else if(dir==2)
{
for i = st_row to end_row
{ print arr[i][col]; noOfCellsVisited++}
dir++;
end_row--;
i am sorry for givin such a naive solution and making so many mistakes.
i still left a mistake in dir==4
*
col=n-1-(col+1);*
--
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
thanks amit for this code
i tried this for the first time and am still not over finding out my
mistakes (got another one while trying it out on an array)
yours was an easy one :)
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this
though the code given by siddharth seems to be a bit tough to understand due
to one long statement, it gives a good idea to run the main loop fron 2^k
-1 to (2^k - 1)*(2^(n-k)) since these rae the only numbers having k digits
set
--
You received this message because you are subscribed to the
can't we include -9 , 3 , 1, 5 , 0 as a possible sub array?
--
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
yup
i got it now.
nice code
--
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
we can just infer that at the point where the man met the driver, from that
point, it takes 10 minutes to reach the office (assuming that car moves at
same uniform speed all the time)
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to
...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tushicom...@gmail.com
Website: www.jugadengg.com
--
You received this message because you
write an scanf that reads only a to z charchter.
--
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
thanks to all . :)
--
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
1st reverse each word in place.then reverse the whole
sentenceit will give the required *answer*
--
Tushar Kanta Rath,
Master In Computer Application
MNNIT, Allahabad
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group
thanks sagar for this wonderful shortcut
but can you please explain it better. in what cases can we use this
approach?
--
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
thankyou :)
--
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
@varun
you are contradicting your own statement
when inline replaces the code at place where it is called, then this code
will work fine.
and the other one w/o inline won't as explained by others also.
there seems to be some confusion in your statement.
--
Tushar Bindal
Computer Engineering
yx - xy = x0y - yx
= (10y + x) - (10x + y) = (100x + y) - (10y + x)
9y - 9x = 99x - 9y
18y = 108x
y=6x
Since, x comes in hundreds place, we know it can only be 1 as the difference
between the 3 digit number and two digit number is difference of two 2 digit
numbers only.
thus, y=6*1 = 6
a
the clock has become faster by 48 seconds in 10800 minutes
i.e., 1 sec in 225 minutes
from 8am on sunday we have to go 225*5*60 minutes behind to get time when
clock showed the correct time.
i.e., 67500 minutes or 44 days 1260 minutes
44 days 21 hours
which means clock showed correct timing at
probability that i win standing at second position: 1/365
third position : 364/365*2/365 = 1/365)*(628/365)
fourth position : 364/365*363/365*3/365
4th : 364/365*363/365*362/365*4/365
nth position:
(365-1)*(365-2)*(365-3)*(365-4)*(365-5).*(365-(n-2))*(365-(n-1))*(n)*(1/365)^n
--
You
Sorry for the previous post
the last line was incorrect
it should have been (n+1)th position
I was just writing roughly and pressed send instead of save.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
- n +1)*(n)}
/ {365*(n-1)}
maximum probability is at nth position if at (n+1)th position,
{(365 - n +1)*(n)} / {365*(n-1)}
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tushicom...@gmail.com
Website: www.jugadengg.com
--
You received
Sumit,
the answer is 14
I think the example of 16 that they take on careerplus is probably confusing
you.
--
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
Sory once again for that incomplete answer.
The complete one is here.
probability that i win standing at second position: 1/365
probability that i win standing at third position : 364/365*2/365 =
1/365)*(628/365)
probability that i win standing at fourth position : 364/365*363/365*3/365
Evenly divisible simply means that a number should be completely divisible
by the given numbers, i.e., it should give a whole number as an answer when
divided by that particular number. Evenly divisible doesn't mean that
quotient should be an even number. It just needs to be a whole number.
.
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.
--
Tushar Bindal
Computer Engineering
Delhi College
- win-win situation
For a change the easier method is faster as well
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tushicom...@gmail.com
Website: www.jugadengg.com
--
You received this message because you are subscribed to the Google Groups
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.
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
, Jul 6, 2011 at 10:16 PM, saurabh singh saurab...@gmail.com
wrote:
I have proposed my solution in one of the previous posts.Check the
solution
there
On Wed, Jul 6, 2011 at 10:10 PM, Tushar Bindal tushicom...@gmail.com
wrote:
good job
but how can this be done in one traversal as asked
/algogeeks?hl=en.
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tushicom...@gmail.com
Website: www.jugadengg.com
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email
options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tushicom...@gmail.com
Website: www.jugadengg.com
--
You received this message because you are subscribed to the Google
@Navneet
Didn't get your point
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tushicom...@gmail.com
Website: www.jugadengg.com
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
the solution is given
herehttp://www.thecareerplus.com/?page=resourcescat=150subCat=10qNo=2
but can anyone lease explain it better
please give a original solution
and stop making rude comments about answers posted genuinely.
If you have an original solution, please post it.
--
You received this
I think you are getting it wrong.
Surender, your solution says that numbers divisible by all of the first 5
prime numbers will be taken into account whereas the question says that only
the numbers *not* evenly divisible by *any* of the first 5 prime numbers are
to be added.
Shiv,
you are making
If my interpretation is right, following should be the code.
int main()
{
int userInteger = 0;
cout Enter A Number endl;
cin userInteger; // Ask For a number from the user
if (userInteger 0) // Is the number valid?
{
int result = 0;
int prime[5] = { 2, 3, 5, 7, 11 };
int a,b, count = 0;
that theorem is for odd primes
9 is not an odd prime
so we can;t apply this theorem
--
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
Manish is right.
This would start from the left.
In cout also processing starts from left.
The processing is from right in the printf statement.
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tusharbin...@jugadengg.com
Website: www.jugadengg.com
I have the book
but I hope there are no issues with ths book being shared here. I don't have
the link now.
would it be fine if I share the book directly?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
is there anyone who has this book?
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tusharbin...@jugadengg.com
Website: www.jugadengg.com
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
searching in the group did not help
please give the link to your previous post
or better give the link once again
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tusharbin...@jugadengg.com
Website: www.jugadengg.com
--
You received this message
Is this one fine?
http://www.megaupload.com/?d=YSSE195C
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tusharbin...@jugadengg.com
Website: www.jugadengg.com
--
You received this message because you are subscribed to the Google Groups
Algorithm
Plz mail the book to me too
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tusharbin...@jugadengg.com
Website: www.jugadengg.com
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
Arpit
The formula that you have written is wrong. You would have approached it
correctly but the formula written here is incorrect.
m= n + (n**1/6* + (n-1)) + ((n**7/6* + (n-1))**1/6* + n-2) +..
If you add all the terms there should be 1/6 in these terms as the terms
give the number of
a[i][j]=1 if 'i' is a parent to 'j'
But in your matrix,
a[1][2] = 1
a[1][3] = 1
a[2][3] = 1
a[4][2] = 1
a[4][3] = 1
You have taken 'j' to be a parent to 'i'
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tusharbin...@jugadengg.com
--
You
xxx, yyy are considered as cases?
--
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
...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tusharbin...@jugadengg.com
--
You received this message because you are subscribed to the Google Groups
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tusharbin...@jugadengg.com
--
You received this message because you are subscribed to the Google Groups
jus a promotional activity. We thot here ppl discuss on
technical topics so it wud b gr8 to enlighten ppl vd such fest whr ppl
compete n exchange knowledge.
Sorry if we broke ne rule for the group.
On Fri, Feb 18, 2011 at 11:57 PM, Tushar Bindal tushicom...@gmail.comwrote:
how can you send
***DELHI TECHNOLOGICAL UNIVERSITY*
*(Formerly DELHI COLLEGE OF ENGINEERING)**
CSI-DTUPHOENIX'11
presents
FIREWALL*
*The Art Of Hacking
*
*
*
Do you swear by having the key to every single lock?
Do you think you possess the innate talent of finding loopholes in anything
and
DELHI TECHNOLOGICAL UNIVERSITY
(Formerly DELHI COLLEGE OF ENGINEERING)
PHOENIX'11
presents
It would be
*vertcal_sum(root-right,level+1);
*in the last line
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tusharbin...@jugadengg.com, tushicom...@gmail.com
--
You received this message because you are subscribed to the Google Groups
I think the following algo should work:
1. Create a DLL of the inorder traversal of the tree
2. for each node, check whether P of that node points to the previous node
in the DLL or not.
3. If not, assign it value NULL
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob
/group/algogeeks?hl=en.
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tusharbin...@jugadengg.com, tushicom...@gmail.com
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group
=en.
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tusharbin...@jugadengg.com, tushicom...@gmail.com
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email
this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tusharbin...@jugadengg.com, tushicom...@gmail.com
--
You received this message because you are subscribed to the Google Groups
Algorithm
sorry.
did not go thru it thoroughly earlier.
got it now.
On Feb 9, 7:35 pm, Tushar Bindal tushicom...@gmail.com wrote:
what are f1, f2, f3,...?
On Wed, Feb 9, 2011 at 5:05 PM, Ujjwal Raj ujjwal@gmail.com wrote:
Input: n meetings
A meeting e(i) has start time s(i) and finish time
bittu,
you have written this code at end of main()
*printGivenOrder(start);
printList(rslt);*
so the BT in spiral order should be printed twice
But you are getting a extra 4 only in place of the whole tree because of
these lines
*temp=current;
current=head;
rslt=appnd(temp,current);
* There
Is it necessary that the two lists are merging at their ends??
Do we have to find whether they merge at the end into same lists or wheter
they are just intersecting??
On Thu, Jan 6, 2011 at 10:04 PM, Aditya adit.sh...@gmail.com wrote:
There are two aspects here for second question.
1. to
have one pointer to the
next. So, if they intersect they will definitely be merging.
On Thu, Jan 6, 2011 at 11:01 PM, Tushar Bindal tushicom...@gmail.comwrote:
Is it necessary that the two lists are merging at their ends??
Do we have to find whether they merge at the end into same lists
++ (giving O(n) time and
memory for generating sequence), but I somehow feel that there can be
a better approach to check if a term already exists in the sequence.
Any suggestion would be gratefully acknowledged.
Regards,
Tushar
--
You received this message because you are subscribed to the Google
hundreds of participants
from all over the world. The total prize money at stake is INR
70,000.
Other than this, there are several other programming contests. Please
visit www.shaastra.org for more details.
Regards
Tushar Rathee
Publicity Core
Shaastra 2008
99 matches
Mail list logo