for the cows ques ... you all are forgetting to add the orginal starting cow
...
thus the answer should be *233*
On Sun, Jul 31, 2011 at 1:30 PM, Nikhil Gupta nikhilgupta2...@gmail.comwrote:
Oops. My bad. Rabbits produce every month too.
I overlooked that.
On Sun, Jul 31, 2011 at 1:24 PM,
if OS installed is of 32 bit ... then compiler will work as working on a 32
bit architecture ... and give the results accordingly ...
@aditi :: i am not so sure abt your stateent regarding the size of pointer
and an int being th same ... could you plzz quote the reference for the same
...
On
use a doubly linked list ... with a field node *min.
weneva you insert an element ... check for the value of min at the head ...
if the new inserted node has less value ... then set the min field to point
to itself else copy the min field of te previous head.
insertion and deletion is easy
its a *doubly* linked list ...
you can easily do the job ...
On Sun, Jul 31, 2011 at 2:23 PM, siva viknesh sivavikne...@gmail.comwrote:
using LL u cant delete in O(1) ... u have to traverse from head
On Jul 31, 1:47 pm, Shubham Maheshwari shubham@gmail.com wrote:
use a doubly linked
you mean circular linked list ...!!!
in case of stack ... we cn do it via SSL ...
for a queue implementation ... we will ned circular, or doubly for deletion
in O(1).
On Sun, Jul 31, 2011 at 2:38 PM, naveen ms naveenms...@gmail.com wrote:
@shubham...i have a doubt.can't the same be done with
color and intensity are2 different things ...
do you mean to find pixels with same intensity ...!!
and wat is meant by can be reached ...!!
On Sun, Jul 31, 2011 at 2:40 PM, sivaviknesh s sivavikne...@gmail.comwrote:
*Given an nxn screen, Each pixel is represented by intensity values.
Given a
hw cn u ensure that the elements are inserted in sorted order ...
wat if the elements are coming randmly ...
On Sun, Jul 31, 2011 at 2:49 PM, muthu raj muthura...@gmail.com wrote:
Use a circular linked list with elements being inserted in sorted order.
Inserting minimum element :
take countr to be a static variable ... that shud do the job ...!!
btw ...if thats nt the case ... thn i m nt pretty sure wat u are asking to
be done ...
On Sun, Jul 31, 2011 at 2:12 AM, Rahul Mittal rahulmitta...@gmail.comwrote:
help me with this
we need to find out how many times a function
will take O(n) time.
On Sun, Jul 31, 2011 at 3:00 PM, Shubham Maheshwari shubham@gmail.com
wrote:
hw cn u ensure that the elements are inserted in sorted order ...
wat if the elements are coming randmly ...
On Sun, Jul 31, 2011 at 2:49 PM, muthu raj muthura...@gmail.com wrote:
Use
http://ideone.com/IZKyN
could you plzz explain this to me ...!!
anyone ...
On Sun, Jul 31, 2011 at 1:56 AM, Kamakshii Aggarwal
kamakshi...@gmail.comwrote:
@sanchit:no,not at all :)
On Sun, Jul 31, 2011 at 1:55 AM, Sanchit Manchanda
sanchit...@gmail.comwrote:
@kamakshi- sorry if you felt
and finding the
minimum element all have O(1) time.
so after deleting the minimum element, where will you point min pointer?
Sorry if i m wrong
On Sun, Jul 31, 2011 at 3:11 PM, Shubham Maheshwari shubham@gmail.com
wrote:
the operation is nt extract min ... its *find* min ...
On Sun
x = 0;
while( n ){
x = 1;
x = x | ( n 1);
n = 1;
}
return x;
On Fri, Jul 22, 2011 at 1:31 PM, Puneet Gautam puneet.nsi...@gmail.comwrote:
sorry guys.. dont check the above siolution.. its wrong...!!!
misread it..
On 7/22/11, Puneet Gautam puneet.nsi...@gmail.com wrote:
check this out:
thnx ...
:D
On Fri, Jul 22, 2011 at 9:19 PM, sagar pareek sagarpar...@gmail.com wrote:
gr8 shubham
On Fri, Jul 22, 2011 at 1:42 PM, Shubham Maheshwari shubham@gmail.com
wrote:
x = 0;
while( n ){
x = 1;
x = x | ( n 1);
n = 1;
}
return x;
On Fri, Jul 22, 2011 at 1:31 PM
could some1 plz post the xplainations ...
On Fri, Jul 22, 2011 at 8:04 PM, Pankaj jatka.oppimi...@gmail.com wrote:
Chetan,
No. How could you relate this problem with that? Do you find something
similar?
~
Pankaj
On Fri, Jul 22, 2011 at 8:01 PM, chetan kapoor
how are you gonna do it if the originl strng contains repeated letters ...
On Fri, Jul 22, 2011 at 3:33 PM, shady sinv...@gmail.com wrote:
what algorithm, print it subsequently
is there any ?
On Fri, Jul 22, 2011 at 3:24 PM, DeeJJ..! suryaprakash...@gmail.comwrote:
@sunny...yaa..but
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.
--
Shubham Maheshwari
ShubZz
O.o o.O
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.
--
Shubham Maheshwari
ShubZz
O.o o.O
enJoY ...!!!
--
You received this message
can we do anything else .. othr than hash tables ...
On Tue, Jul 19, 2011 at 1:05 AM, Saket Choudhary sake...@gmail.com wrote:
Have a hash Table. Read the elements and push it to the hash table. If it
alraedy exists you are done.
On 19 July 2011 01:02, Shubham Maheshwari shubham.veloc
in a
unless b.include?(m)
bm
else
puts m
break
end
end
On 19 July 2011 01:05, Saket Choudhary sake...@gmail.com wrote:
Have a hash Table. Read the elements and push it to the hash table. If it
alraedy exists you are done.
On 19 July 2011 01:02, Shubham Maheshwari
this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Shubham Maheshwari
ShubZz
O.o o.O
enJoY ...!!!
--
You received this message because you are subscribed to the Google Groups
Algorithm
Maheshwari
shubham.veloc...@gmail.com wrote:
:D
On Sun, Jul 17, 2011 at 2:24 AM, Kamakshii Aggarwal
kamakshi...@gmail.com wrote:
@shubham:yes u r right.thanks :)
On Sun, Jul 17, 2011 at 2:12 AM, Shubham Maheshwari
shubham.veloc...@gmail.com wrote:
@Kamakshii:
thats probably becuz a union
://groups.google.com/group/algogeeks?hl=en.
--
Shubham Maheshwari
ShubZz
O.o o.O
enJoY ...!!!
--
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
.
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.
--
Shubham Maheshwari
ShubZz
O.o o.O
enJoY
union Data Type
What is the output of the following program? Why?
#include
main() {
typedef union {
int a;
char b[10];
float c;
}
Union;
Union x,y = {100};
x.a = 50;
strcpy(x.b,hello);
x.c = 21.50;
printf(Union x : %d %s %f n,x.a,x.b,x.c);
printf(Union y : %d %s %f n,y.a,y.b,y.c);
}
--
Shubham
you mean to say .. the ques is wrong ... or what ...!!
On Sun, Jul 17, 2011 at 1:54 AM, sagar pareek sagarpar...@gmail.com wrote:
I think you must first read about unions and the differences between union
and structures :)
On Sun, Jul 17, 2011 at 1:48 AM, Shubham Maheshwari
shubham.veloc
of 100.
On Sun, Jul 17, 2011 at 1:58 AM, Shubham Maheshwari
shubham.veloc...@gmail.com wrote:
you mean to say .. the ques is wrong ... or what ...!!
On Sun, Jul 17, 2011 at 1:54 AM, sagar pareek sagarpar...@gmail.comwrote:
I think you must first read about unions and the differences
26 matches
Mail list logo