+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
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
http://groups.google.com/group/algogeeks?hl=en.
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
You received
A correction, it is *(2^p) - 1 *, and the answer (*2^(number of primes less
than n)) - 1* .(It is simply taking any subset of the primes,leaving the
one in which do not take any prime)
On Sun, Jun 10, 2012 at 10:03 PM, Piyush Kapoor pkjee2...@gmail.com wrote:
The problem simply asks you
:
@piyush : i dont think so BIT would work over here , we are not just
reporting cumulative sum tilll index i.
On Mon, Mar 12, 2012 at 12:58 AM, Piyush Kapoor pkjee2...@gmail.comwrote:
This can be done very easily with the help of a Binary Indexed
Tree,and it is very short to code as well.Simply
1)First map the array numbers into the position in which they would be, if
they are sorted,for example
{30,50,10,60,77,88} --- {2,3,1,4,5,6}
2)Now for each number ,find the cumulative frequency of index ( = the
corresponding number in the map - 1).
3)Output the cumulative frequency and increase
.
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
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
xy is a mixed expression involving two operands of different types,one of
unsigned int and other signed int.Since implicit type conversion takes
place in such cases,the signed int is converted to unsigned int ,which
means that
-2(signed) is converted to
4294967294 (unsigned) .,and then the
) ==
(N-1)C2
4)Using exactly 3 'H's::== (N-2)C3
and so on..
Answer = = 1+NC1 + (N-1)C2 + (N-2)C3 + . (till N-r =r)
which is same as fibonacci series.
So the answer was the fibonacci number divided by (2^n)
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
You received this message because
.
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
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
In which library do powl() and log10l() lie(they r not in cmath,i think)
,can anybody post a good reference to these..(I could not find much on
googling)
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
You received this message because you are subscribed to the Google Groups
Algorithm
Yes these are in cmath(or math.h) ,
/* 7.12.6.8 Double in C89 */
extern float __cdecl log10f (float);
extern long double __cdecl log10l (long double);
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
You received
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.
--
*Regards,*
*Piyush Kapoor
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.
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
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.
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
You received
,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
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
;
}
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
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
solution
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
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
at
http://groups.google.com/group/algogeeks?hl=en.
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
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
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.
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
You received
email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group
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.
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
You received this message
.
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.
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU
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.
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
You received
/group/algogeeks?hl=en.
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
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
.(The head node is not given).
(In both of the above cases,the linked lists are singly linked lists.)
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
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 the node to be
delete and remove the tail. This will not work if node to be deleted
is the last node.
On Wed, Aug 10, 2011 at 11:44 PM, Piyush Kapoor pkjee2...@gmail.com
wrote:
Q1)Two linked Lists are given,i.e,their head pointers are given,and the
problem is to check if the second one
copying data from the next node to the node to be
delete and remove the tail. This will not work if node to be deleted
is the last node.
On Wed, Aug 10, 2011 at 11:44 PM, Piyush Kapoor pkjee2...@gmail.com
wrote:
Q1)Two linked Lists are given,i.e,their head pointers are given,and the
problem
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.
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
You received this message because you
/group/algogeeks?hl=en.
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
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
I think it is because the numbers like 0.7 do not have a exact binary
representation,so they are not exactly represented in float,while the
constant is internally implemented as double.,Read this::
http://www.topcoder.com/tc?module=Staticd1=tutorialsd2=integersReals
--
*Regards,*
*Piyush Kapoor
.
--
*Regards,*
*Piyush Kapoor,*
*CSE-IT-BHU*
--
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
.
--
*Regards,*
*Piyush Kapoor,*
*CSE-IT-BHU*
--
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
email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
*Regards,*
*Piyush Kapoor,*
*CSE-IT-BHU*
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
.
01001100110011001100110011001100110011(non terminationg) but only 1st 23
bits are saved rest are left
so finally wht we get is:
1100 10100110 01100110 01100110
(64) (-90) (102)(102)
On Wed, Jul 13, 2011 at 2:49 PM, Piyush Kapoor pkjee2...@gmail.comwrote:
why do we need
://groups.google.com/group/algogeeks?hl=en.
--
*Regards,*
*Piyush Kapoor,*
*CSE-IT-BHU*
--
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
why is the order of numbers reversed?
On Wed, Jul 13, 2011 at 8:07 PM, Anika Jain anika.jai...@gmail.com wrote:
sorry its 0100 not 1100 coz 5.2 is a positive no. so sign bit is 0
On Wed, Jul 13, 2011 at 7:58 PM, Piyush Kapoor pkjee2...@gmail.comwrote:
Shouldn't the value
..
the order isnt reversed.. look at the code, the code 1st prints lowest
order byte then next and then next and then highest soo output is 102 102
-90 64
On Wed, Jul 13, 2011 at 8:08 PM, Piyush Kapoor pkjee2...@gmail.comwrote:
why is the order of numbers reversed?
On Wed, Jul 13, 2011 at 8:07
thanks,i hv just entered 2nd year,so most probably i will study this
year
--
*Regards,*
*Piyush Kapoor,*
*CSE-IT-BHU*
--
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
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
*Regards,*
*Piyush Kapoor,*
*CSE-IT-BHU*
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group
,*
*Piyush Kapoor,*
*CSE-IT-BHU*
--
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
char a[20];
int l;
int main()
{
char str[100];
scanf(%s,str);
l=strlen(str);
}
--
*Regards,*
*Piyush Kapoor,*
*CSE-IT-BHU*
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks
Pls Ignore my above post..
On Thu, Jul 7, 2011 at 10:36 PM, Piyush Kapoor pkjee2...@gmail.com wrote:
char a[20];
int l;
int main()
{
char str[100];
scanf(%s,str);
l=strlen(str);
}
--
*Regards,*
*Piyush Kapoor,*
*CSE-IT-BHU*
--
*Regards,*
*Piyush Kapoor,*
*CSE
at 10:37 PM, Piyush Kapoor pkjee2...@gmail.com wrote:
Pls Ignore my above post..
On Thu, Jul 7, 2011 at 10:36 PM, Piyush Kapoor pkjee2...@gmail.comwrote:
char a[20];
int l;
int main()
{
char str[100];
scanf(%s,str);
l=strlen(str);
}
--
*Regards,*
*Piyush Kapoor
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.
--
*Regards,*
*Piyush Kapoor,*
*CSE-IT-BHU*
--
You received this message because you
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
*Regards,*
*Piyush Kapoor,*
*CSE-IT-BHU*
--
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 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.
--
*Regards,*
*Piyush Kapoor,*
*CSE-IT-BHU*
--
You
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.
--
*Regards,*
*Piyush Kapoor,*
*CSE
://groups.google.com/group/algogeeks?hl=en.
--
*Regards,*
*Piyush Kapoor,*
*CSE-IT-BHU*
--
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
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.
--
*Regards,*
*Piyush Kapoor,*
*CSE-IT-BHU
at
http://groups.google.com/group/algogeeks?hl=en.
--
*Regards,*
*Piyush Kapoor,*
*CSE-IT-BHU*
--
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
that we have the two
sets of bits in the correct positions, we simply need to combine them,
and the logical or operator does that just fine. The overall result is
(x 0x55) 1) | ((x 1) 0x55).
Dave
On Jun 27, 7:53 am, piyush kapoor pkjee2...@gmail.com wrote:
Yep,I also want to know the same
You are using too much memory :: long long arr[10003][10003];
--
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
int main()
{
char a;
printf(%d %d,sizeof(a),sizeof('a'));
return 0;
}
Output:
1 4
why does the expression sizeof('a') evaluates it as an integer,not as a
character??
--
*Regards,*
*Piyush Kapoor,*
*CSE-IT-BHU*
--
You received this message because you are subscribed to the Google
You didn't understand my question...
Why is sizeof() interpreting a constant character literal as ascii???
--
*Regards,*
*Piyush Kapoor,*
*CSE-IT-BHU*
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email
Thanks a lot :)
--
*Regards,*
*Piyush Kapoor,*
*CSE-IT-BHU*
--
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
BTW,which book is being referred??
--
*Regards,*
*Piyush Kapoor,*
*CSE-IT-BHU*
--
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
exit(0) is one option..(
http://cboard.cprogramming.com/c-programming/118998-exit-0-doubt.html)
--
*Regards,*
*Piyush Kapoor,*
*CSE-IT-BHU*
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks
http://ideone.com/CJxFK give (null) 0.00
--
*Regards,*
*Piyush Kapoor,*
*CSE-IT-BHU*
--
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
consider 2 nos a = 1010 b = 1011 ( in bits)
take xor of these
c = a ^ b;
c = 1010
^1011;
c = 0001
idea is if there are 2 1s then make it 0 , if one 1 and one 0 then make it 1;
d = ab;
when there are 2 ones u have to produce a carry .
d = 1010
1011
1000
this d needs to be
ptr-next = ptr-next-next , it will leave dangling pointer but the node
wil be deleted
On Fri, Jan 23, 2009 at 2:33 PM, Shivang agarwal.shiv...@gmail.com wrote:
Hi all,
I was stuck in this ques.
Delete the node next to the node pointed to by a given ptr in a
linked list in a one line code.
61 matches
Mail list logo