to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards
Anika Jain
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email
sorry note its right shifting in my above post instead of left shift!
On Thu, Jun 14, 2012 at 12:47 PM, Anika Jain anika.jai...@gmail.com wrote:
keep on left shifting the number till it becomes 0. the moment it becomes
0, the count of how many times you had to right shift the number to get 0
email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards
Anika Jain
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email
how can we implement exception handling in c?
--
Regards
Anika Jain
--
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
printf(%d\n, (int) ((int*)0 +1)); its prints no. of bytes in integer.
please explain what does this mean? what and how is happening in this?
--
Regards
Anika Jain
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send
options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards
Anika Jain
--
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
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
Anika Jain
--
You received
with an
example in case i have understood you incorrectly
Best Regards
Ashish Goel
Think positive and find fuel in failure
+919985813081
+919966006652
On Thu, May 17, 2012 at 3:33 PM, Anika Jain anika.jai...@gmail.comwrote:
there's a solution of O(log n) where 2D matrix has n rows and n
://groups.google.com/group/algogeeks?hl=en.
--
Regards
Anika Jain
--
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
@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
Anika Jain
--
You received this message because you are subscribed to the Google Groups
Algorithm
this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards
Anika Jain
--
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
@atul: yes i agree with you.. hmm..
On Tue, Jan 17, 2012 at 10:21 PM, atul anand atul.87fri...@gmail.comwrote:
@anika : i guess.if your concern is allowed then i dont think so we
can solve this problem.
On Tue, Jan 17, 2012 at 9:59 PM, Anika Jain anika.jai...@gmail.comwrote:
hey, does
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
Anika Jain
+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards
Anika Jain
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks
yes..
On Tue, Nov 22, 2011 at 1:23 PM, Aniket aniket...@gmail.com wrote:
Can a function return a void pointer ?
--
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
I think smallest will be having just one character . it can be a or b or c.
On Sat, Nov 12, 2011 at 3:07 PM, Snoopy Me thesnoop...@gmail.com wrote:
Given a string consisting of a,b and c's, we can perform the following
operation:
Take any two adjacent distinct characters and replace it with
You have written some code/program and delivered it to d customer. Now u
dont have the source code with u. The program is not working fine at the
customer's place. How will u catch the bug?(remember u dont have the source
code wid u).
This is an OS question. I dont know the answer. It was asked
its coming out be either 1 or 2 in all cases
On Sun, Nov 13, 2011 at 1:55 PM, UTKARSH SRIVASTAV
usrivastav...@gmail.comwrote:
@Surinder give some proof or logic
On Sun, Nov 13, 2011 at 10:25 AM, surender sanke surend...@gmail.comwrote:
@nitin
yes i meant the same, if each different
@mohit: your algo will add assurance that the tree is balanced.. otherwise
ankit's approach is sufficient.
On Sat, Nov 5, 2011 at 8:49 PM, mohit verma mohit89m...@gmail.com wrote:
another way is : convert binary tree to link list , sort the list and
using divide and conquer approach create
yes 5 will be printed with 99 extra padding spaces.
On Sat, Oct 29, 2011 at 4:16 PM, rahul sharma rahul23111...@gmail.comwrote:
does y goes to d of %*d and it print 5???i hav a doubt
On Fri, Oct 28, 2011 at 9:32 PM, amrit harry dabbcomput...@gmail.comwrote:
let this statement int
initial call to this function is arrange(arr,n/3,n/3) where n is actually
3*n as per the question , like n=30 for a1,...,a10,b1,...,b10,c1,c10
The idea used here is that for some i-1 ranging from 1 to 9 for above
example, i-1 goes to 3*(i-1), n+i-1 to 3*(i-1) +1, and 2*n+i-1 to
3*(i-1)+2..
i have the code solution to this.. if m allowed to post it here then i can i
post it. m i allowed to post code here?
On Fri, Oct 14, 2011 at 9:40 PM, gaurav yadav gauravyadav1...@gmail.comwrote:
@shiva...keep swapping the underline elements
a1*a2*a3a4a5*b1*b2b3b4b5c1c2c3c4c5
hey sachin: amdocs is coming for job at wich location??
On Oct 2, 8:55 pm, gaurav yadav gauravyadav1...@gmail.com wrote:
my number= +919939569122
gtalk id=gauravyadav1...@gmail.com
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to
hello moderators n owners of this group.
I have made a new id in gmail for my exclusive study on algogeeks. I sent a
request for adding me but it got rejected.
Can you please let me get added on this group by that id also , it is
anika.jain...@gmail.com. If you want after getting permission on
package is 6lpa
On Sep 28, 1:14 pm, sukran dhawan sukrandha...@gmail.com wrote:
wats the package ?
On Tue, Sep 27, 2011 at 9:08 PM, Nitin coolguyinat...@gmail.com wrote:
C questions there are 12 -13 questions given on internet it will be same as
it is given in the paper ,i dnt find a
for a N * M matrix is is possible to print zigzag fashion of that matrix?
For example:
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
i want print like
1
6 2
11 7 3
12 8 4
13 9 5
14 10
15
I am able to get this where N !=M..
How can i do this, ??
--
You received this message because you are
hiii... ok i meant job offer is for Pune or NCR area ??if u knw..
On Oct 2, 11:29 pm, sachin goyal monugoya...@gmail.com wrote:
h anika.amdocs in coming to thapar on 7 oct.
On Sun, Oct 2, 2011 at 11:01 PM, Anika Jain anika.jai...@gmail.com wrote:
hey sachin: amdocs
only possible for continuous disctees attributes.
--
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
:06 pm, Anika Jain anika.jai...@gmail.com wrote:
there will be 15 english fill in the blanks, 5 series questn, 10 aptitude
questions, 10 logical questions..
then 10 c++ mcqs and 5 coding questions
On Wed, Aug 17, 2011 at 5:28 PM, Brijesh Upadhyay
brijeshupadhyay
hey but 935*2+69 = 1939 and when this is divided by 38 remainder iscoming to
be 1..i guess so.. is it ryt?
On Wed, Aug 17, 2011 at 9:55 PM, aditya kumar
aditya.kumar130...@gmail.comwrote:
i guess if the option is provided it would have been an appropiate question
.
On Wed, Aug 17, 2011 at
there will be 15 english fill in the blanks, 5 series questn, 10 aptitude
questions, 10 logical questions..
then 10 c++ mcqs and 5 coding questions
On Wed, Aug 17, 2011 at 5:28 PM, Brijesh Upadhyay
brijeshupadhyay...@gmail.com wrote:
has anyone given MMT written test.?? please reply , what is
i didnt get it tht even if there are distinct elements how scanning sum
three lines return us the max n min elements? how will this scan whole
matrix for finding the max n min elements???
On Wed, Aug 17, 2011 at 1:32 AM, priya ramesh
love.for.programm...@gmail.com wrote:
are these algos
i cudnt understand how is it done here by using xor by chen.. aftergetting F
it wud be the xor of of odd occuring elements, fine, then he wrote if(xor)A1
==0 how is this logic used??
On Wed, Aug 17, 2011 at 8:17 AM, saurabh singh saurab...@gmail.com wrote:
+1 to dave.xor is the way to
node *common_ancestor(node *root, node **prev, int x,int y)
{
if(root-a==x || root-a==y)
return *prev;
else if(root-a x root-a y)
{
prev=root;
return common_ancestor(root-l,prev, x,y);
}
else if(root-a x root-a
i m sorry i cant understand the question.. if there are n no. steps to cross
and he can take only one step at a time.. then suppose n=3 then obviously
doesnt he need to take step 1 first then step 2 then step 3.. ?? m confused!
On Sun, Aug 14, 2011 at 12:38 AM, Kamakshii Aggarwal
in the first code the output is 4 bcoz *p means *p[0] that means p[0] that
is some address so for 32 bit machine its coming to be 4 bytes..
in the 2nd it is 80 as 20*sizeof(int *) and not as you mentioned..
On Sun, Aug 14, 2011 at 6:12 PM, rShetty rajeevr...@gmail.com wrote:
Please explain this
plz tell me that for this triangle.. if 12 is given then what to do?
On Sun, Aug 14, 2011 at 7:49 PM, muruga vel murugavidya1...@gmail.comwrote:
I was asked to find out the no of rows given n . i.e. how we say 4 rows
for 10 ???
On 14 Aug 2011 10:54, sagar pareek sagarpar...@gmail.com wrote:
@ashmantak: the figure of dipankar is incorrect but his point is correct..
for a tree like
4
/\
2 10
/ \
13
successor of 3 shall be 4 not 2..
On Fri, Aug 12, 2011 at 4:48 PM, ashmantak
It is the solution for inorder successor without having parent pointer..
node *inorder_succ(node *root, int x)
{
node *prev=NULL;
node *p=findspcl(root,prev, x);
if(p-r)
{
p=p-r;
while(p-l)
p=p-l;
return p;
@gaurav: nyc one ;) how u made this one well?
On Sat, Aug 13, 2011 at 6:14 PM, SANDEEP CHUGH sandeep.aa...@gmail.comwrote:
lol
On Sat, Aug 13, 2011 at 6:12 PM, Gaurav Menghani
gaurav.mengh...@gmail.com wrote:
http://lmgtfy.com/?q=scanf+float+precision+format
On Sat, Aug 13, 2011 at
this code has so many errors
On Thu, Aug 11, 2011 at 11:36 PM, manvir siyo manis...@gmail.com wrote:
output of the program?
#define prn(a) printf(%d,a)
#define print(a,b,c) prn(a), prn(b), prn(c)
#define max(a,b) (a
main()
{
int x=1, y=2;
print(max(x++,y),x,y);
print(max(x++,y),x,y);
i understand longest subsequence.. but what is longest increasing
subsequence .. i dont know the difference between them..plz sumbody tel ..
On Tue, Aug 9, 2011 at 9:41 AM, Akash Mukherjee akash...@gmail.com wrote:
@udit : thanx man...they were really helpful
2 allcan u plzz chk d
okk thanx
On Wed, Aug 10, 2011 at 11:58 AM, sagar pareek sagarpar...@gmail.comwrote:
like u have given array
*1 2 3 4 5 7* 6 7 8 9 *1 2 3 4 5 6 *5 4 3 6 7 8
ans will be 6
On Wed, Aug 10, 2011 at 11:30 AM, Anika Jain anika.jai...@gmail.comwrote:
i understand longest subsequence
@brijesh: if we have to find leftmost right cousin for 9 in the same tree..
then it shall be 8.. but 9 is in right subtree of 7..
On Tue, Aug 9, 2011 at 2:11 PM, Brijesh Upadhyay
brijeshupadhyay...@gmail.com wrote:
10
4 5
2
ah.. my mistake sorry
On Tue, Aug 9, 2011 at 9:24 PM, Anika Jain anika.jai...@gmail.com wrote:
@brijesh: if we have to find leftmost right cousin for 9 in the same tree..
then it shall be 8.. but 9 is in right subtree of 7..
On Tue, Aug 9, 2011 at 2:11 PM, Brijesh Upadhyay
brijeshupadhyay
u save its output in a file and note nos. from 32676 to a large value
4294967295 are missing in this..
On Tue, Aug 2, 2011 at 12:59 AM, jagrati verma
jagrativermamn...@gmail.comwrote:
it is nt an infinite loop it ends at 4294967295
On Tue, Aug 2, 2011 at 12:53 AM, vijay goswami
what if we write that function as private of base class.. and make a
function in derived class that is friend function of the base class do that
it can call tht private function of base.??
On Sun, Jul 31, 2011 at 8:25 PM, muthu raj muthura...@gmail.com wrote:
Yeah but there is no equivalent of
In C default return type is int and as you havent given return type for f
function compiler assumes it as int but u r not returning any integer from
that function
On Sun, Jul 31, 2011 at 8:33 PM, Rajesh Kumar testalgori...@gmail.comwrote:
What is Error in This program??plzrply
#includestdio.h
@gopi: in 2nd of urs we after tree creation we will need to search each
element in array that will take o(nlogn) time.. is there any appraoch tht
reduces this?
On Sun, Jul 31, 2011 at 6:39 PM, *$* gopi.komand...@gmail.com wrote:
Q1-Construct a binary tree , in such a way that if element
being overridden
in derived class.
*Muthuraj R
IV th Year , ISE
PESIT , Bangalore*
On Sun, Jul 31, 2011 at 8:04 AM, Anika Jain anika.jai...@gmail.comwrote:
what if we write that function as private of base class.. and make a
function in derived class that is friend function of the base class
class B;
class A
{
int a;
public:
int f2(){}
friend int B::func(A ob);
};
class B:public A
{
public:
int func(A ob)
{
}
};
why compilation error is coming over here for friend statement n forward
protype declaration of class B ??
--
You received this message
and calling the version of
f() that belong to derived class B .. ie is the same class object is calling
the same class function .
correct me if i m wrong .
On Sun, Jul 31, 2011 at 8:42 AM, Anika Jain anika.jai...@gmail.comwrote:
@ muthu : not declaring tht function as virtual wont save
overriding redefining virtual function..
Well then as per this definition not defining the func as virtual is nt the
solution..
On Sun, Jul 31, 2011 at 10:04 PM, aditi garg aditi.garg.6...@gmail.comwrote:
@ Ankit: Wat is overriding actually thn?
On Sun, Jul 31, 2011 at 9:58 PM, Anika Jain
sorry overriding is redifining virtual function
On Sun, Jul 31, 2011 at 10:05 PM, Anika Jain anika.jai...@gmail.com wrote:
overriding redefining virtual function..
Well then as per this definition not defining the func as virtual is nt the
solution..
On Sun, Jul 31, 2011 at 10:04 PM, aditi
this is the recursive code..Iterative does any1 know?
On Thu, Jul 28, 2011 at 7:58 AM, ambika iyer balu200...@gmail.com wrote:
@tushar : thnx!!
On Thu, Jul 28, 2011 at 8:11 PM, Tushar Bindal tushicom...@gmail.comwrote:
it should be O(n)
where n is number of nodes as we get into the
is it lyk for {1,2,3
4,5,6,
7,8,9}
to be {3,2,1,
6,5,4,
9,8,7}??
On Wed, Jul 27, 2011 at 9:37 AM, Deoki Nandan deok...@gmail.com wrote:
rotate a 2D matrix by angle 180
--
**With Regards
Deoki Nandan Vishwakarma
*
*
--
You
no we cant..
coz when we do say int *p=4000;
its fine till now.. and if we do *p=10; it is segmentation fault..
On Wed, Jul 27, 2011 at 10:35 PM, rShetty rajeevr...@gmail.com wrote:
Usually when I declare a variable it will be stored in memory location
with some address .
Such as consider I
program.
On Wed, Jul 27, 2011 at 11:26 PM, Puneet Gautam puneet.nsi...@gmail.comwrote:
@Anika : pls elaborate the segmentatin part...!
On 7/27/11, Anika Jain anika.jai...@gmail.com wrote:
no we cant..
coz when we do say int *p=4000;
its fine till now.. and if we do *p=10; it is segmentation
int palin(char *p)
{
int x=0;
while(*p)
{
x^=1(*p-'a');
p++;
}
int i=0,count=0;
while(i26)
{
count+=(1i x)i;
i++;
}
if(count1)
return 0;
else
return 1;
}
--
You received this message because you are
a is a pointer to somewhere where string is written..
p is a pointer to somewhere where new sring is written.
temp is made to point at same location to which a is currently pointing that
is at string
by malloc some new memory is alloted and a is made to point to thast
memory.. temp remains to
in this in scanf one,two, four five will b thr, no thr..
and sumbody plz tell afterwards this change why the o/p is
this is 10 times charlie
thisis10charlie
why in 'four' empty string is going??
On Sat, Jul 23, 2011 at 9:37 PM, geek forgeek geekhori...@gmail.com wrote:
#includestdio.h
\n);
else
printf(big endian\n);
}
On Thu, Jul 21, 2011 at 3:53 AM, Piyush Sinha ecstasy.piy...@gmail.comwrote:
@Anika..can u give one example??
On 7/21/11, Anika Jain anika.jai...@gmail.com wrote:
write a c code that takes a 32 bit ip address n prints it in dotted
notation
sorry its 32 bit no. not 323..wrote tht by mistake
On Thu, Jul 21, 2011 at 1:57 PM, Anika Jain anika.jai...@gmail.com wrote:
@piyush: lets say 323 bit integer given is the one with its binary as
1110 00011000 0101 00110011 then output shall be 14.24.65.51
both for little as well
thanx all :)
On Thu, Jul 21, 2011 at 2:26 PM, Piyush Sinha ecstasy.piy...@gmail.comwrote:
http://www.ideone.com/4Rq51
--
*Piyush Sinha*
*IIIT, Allahabad*
*+91-7483122727*
* https://www.facebook.com/profile.php?id=10655377926 NEVER SAY
NEVER
*
--
You received this message
write a c code that takes a 32 bit ip address n prints it in dotted notation
as a.b.c.d.
The code shall work for big endian as well as for little endian..
In this how can i make it common for big endian and little endian?? if in
little endian my lower order 8 bits shall be d but for big endian
here T becomes char *.. u r trying to add two addreses here...
On Tue, Jul 19, 2011 at 9:46 PM, nidhi jain nidhi.jain311...@gmail.comwrote:
Consider a c++ template funtion
templateclass T
T Add(T a, T b)
{return a+b ;}
if this function is called as T c = Add(SAM, SUNG); what will
happen?
node *listing::rev(node *p)
{
if(p-next==NULL)
{
head=p;
return p;
}
else
{
node *t=rev(p-next);
t-next=p;
p-next=NULL;
tail=p;
return p;
}
}
On Sun, Jul 17, 2011 at 3:21 PM, Nishant Mittal
initial call to this will be rev(head);
On Sun, Jul 17, 2011 at 4:28 PM, Anika Jain anika.jai...@gmail.com wrote:
node *listing::rev(node *p)
{
if(p-next==NULL)
{
head=p;
return p;
}
else
{
node *t=rev(p-next);
t-next=p;
p
Q.1 what is the output of following program?
#include iostream
using namespace std;
class A
{
public:
A()
{ coutConstructing Aendl;
}
~A()
{ coutDestructing Aendl;
}
};
class B : public A
{
public:
B()
locally. Since
you are using c++, make the following changes.
void swap*(node* p,node* q)*
{
node *t;
t=p;
p=q;
q=t;
}
Regards,
Sandeep Jain
On Thu, Jul 14, 2011 at 1:45 AM, Anika Jain anika.jai...@gmail.comwrote:
n sorry i have wriiten it in c++ not c..
On Thu
compilation error lvalue required
coz on lhs of ++*b=++*b is not a variable but a value
On Thu, Jul 14, 2011 at 11:58 AM, abhishek kumar
mailatabhishekgu...@gmail.com wrote:
hi friends,
i have a doubt about this code. what will be its output and how.
int a=35,*b;
b=a;
++*b=++*b;
--
ya i have posted na just nw i m sorry tht i misunderstood it.. swap code
within the func is working ryt n swap func itself is working wrong..
On Thu, Jul 14, 2011 at 4:20 PM, kavitha nk kavithan...@gmail.com wrote:
ya i too think de same...
//BE COOL// kavi
--
You received this
a better idea is use this:
int a=9,b=4;
int sum=printf(%*s%*s,a,,b,);
printf(%d\n,sum);
On Wed, Jul 13, 2011 at 1:52 PM, nicks crazy.logic.k...@gmail.com wrote:
if someone has better idea...then please suggest that.
plz explain how this is calculating sum -- sum= (int)p[b];
On Wed,
binary equivalent of 5.2 is
101.0011001100110011001100110011(nonterminating)..
now it is actually stored in normalised frorm in 32 bits..
like this
--1 bit for sign8 bits for exponent-23 bits for
fraction--
this is from higher order byte to lower order for little endian..
...@gmail.comwrote:
Can you explain how its working?
On Wed, Jul 13, 2011 at 1:58 PM, Anika Jain anika.jai...@gmail.com
wrote:
a better idea is use this:
int a=9,b=4;
int sum=printf(%*s%*s,a,,b,);
printf(%d\n,sum);
On Wed, Jul 13, 2011 at 1:52 PM, nicks crazy.logic.k...@gmail.com
@ vaibhav: ohh sorry, ya its leaving the columns..
so we can do
int a=9,b=4;
int sum=printf(%*s%*s,a,,b,);
printf(\r%d\n,sum);
On Wed, Jul 13, 2011 at 6:09 PM, Anika Jain anika.jai...@gmail.com wrote:
@vaibhav: no it wont coz its printing empty strings.. nothing will be
printed
On Wed, Jul
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.com wrote:
Shouldn't the value of 1100 be -64
On Wed, Jul 13, 2011 at 4:53 PM, Anika Jain anika.jai...@gmail.comwrote:
binary equivalent of 5.2
how to remove duplicates from a linked list?? is it mandatory to sort the
list first?l
--
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
is the order of numbers reversed?
On Wed, Jul 13, 2011 at 8:07 PM, Anika Jain anika.jai...@gmail.comwrote:
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 of 1100 be -64
at 10:18 PM, Anika Jain anika.jai...@gmail.comwrote:
it is not unsigned its signed but positive thts y it is 0..
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
can some body tell me that:
void swap(node *p,node *q)
{
node *t;
t=p;
p=q;
q=t;
}
void mirror(node *p)
{
if (p==NULL)
return;
else
{mirror(p-r);
mirror(p-l);
swap(p-r,p-l);
}
}
in this the swapping is occuring but if i do :
void
by using swap function is pointer to a pointer used then??
On Thu, Jul 14, 2011 at 1:36 AM, Piyush Kapoor pkjee2...@gmail.com wrote:
u need a pointer to a pointer to swap the pointers...
On Thu, Jul 14, 2011 at 1:21 AM, Anika Jain anika.jai...@gmail.comwrote:
can some body tell me
n sorry i have wriiten it in c++ not c..
On Thu, Jul 14, 2011 at 1:44 AM, Anika Jain anika.jai...@gmail.com wrote:
by using swap function is pointer to a pointer used then??
On Thu, Jul 14, 2011 at 1:36 AM, Piyush Kapoor pkjee2...@gmail.comwrote:
u need a pointer to a pointer to swap
As in base 10 we say 552.5 is same as 5.525 *10^2 , here 2 is the exponent
of base 10.. so similarly in binary nos. for base 2 here if i make
101.00110011.. to 1.0100110011.. *2^2 my exponent is 2.. now in storage of
floats exponent is stored as exponent +127 i.e here 2 +127 so we get
1001
awesum :) thanx all
On Tue, Jul 12, 2011 at 8:27 PM, bittu shashank7andr...@gmail.com wrote:
Lets Try For Decimal Integer Number how we add them
1 Add 759 + 674, but “forget” to carry I then get 323
2 Add 759 + 674 but only do the carrying, rather than the addition of
each digit I then
A c code for this is:
int main()
{
int a[2] = {0};
char str[50];
int i,ind=0;
scanf (%s, str);
for(i=0;istrlen(str);i++)
{
if(str[i]='a' str[i]='z')
{
if(!(a[0] 1str[i]-'a'))
{
a[0] = a[0] | 1str[i]-'a';
*if i have to write a code for finding middle element in a linked list..
then for even length linked which will be the middle element both n/2-1 and
n/2+1 or just n/2+1???
if its both then how can i make my function two elements??
*
--
You received this message because you are subscribed to the
YA.. N YA M USING 2 VARIABLES.. IS IT ALLOWED?
On Mon, Jul 11, 2011 at 4:58 PM, saurabh singh saurab...@gmail.com wrote:
A similar solution has been proposed above if I am not misinterpreting the
code,You are creating a bitmap from the 2 variables.?
On Mon, Jul 11, 2011 at 4:55 PM, Anika
@sandeep sir: i didnt get it how is it takin o(n^2) ??
On Mon, Jul 11, 2011 at 5:18 PM, Sandeep Jain sandeep6...@gmail.com wrote:
Anika, look closely.
Your code takes O(N^2) instead of O(N)
Regards,
Sandeep Jain
On Mon, Jul 11, 2011 at 5:15 PM, Anika Jain anika.jai...@gmail.comwrote
ohh ok! got it!
On Mon, Jul 11, 2011 at 8:05 PM, Sandeep Jain sandeep6...@gmail.com wrote:
Hint: What is the time complexity of strlen??
Regards,
Sandeep Jain
On Mon, Jul 11, 2011 at 8:00 PM, Anika Jain anika.jai...@gmail.comwrote:
@sandeep sir: i didnt get it how is it takin o(n^2
how to do subtraction of two integers widout using subtractn??
--
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
93747
On Wed, Jul 6, 2011 at 5:05 AM, anurag aggarwal
anurag19aggar...@gmail.comwrote:
93747
On Wed, Jul 6, 2011 at 5:28 PM, rupali chauhan
chauhanrupal...@gmail.comwrote:
Solve Dis!
A Boy Forgot His
Pin-Code Which Was Of 5 Digits,
But Luckily He Remembered
Some Hints How To 2 Remind
in this actually whats happening is :
int i=0;
while((i--)!=0)
i-=i++;
printf(%d\n,i);
here when i is compared to 0 i is 0 and then it is decremented to -1, while
loop never gets executed.
On Mon, Jul 4, 2011 at 3:54 PM, amit the cool amitthecoo...@gmail.comwrote:
main()
{
int i=0;
do we need to add m in each a[i]?? shudnt it be a[i] = a+ n*i?? i think i m
doing a silly mistake.. bt plz tell me..
On Thu, Jun 30, 2011 at 7:41 AM, Dave dave_and_da...@juno.com wrote:
@Rizwan: Not completely. What if ROW in your code is a variable (not a
constant) that is not known until run
@sunny: in a[2,4] has 2 1s and one 0 then how is it a solution? i mean i
didnt get wen a[i]==a[j] then a[i,j] is a solution case..
On Fri, Jul 1, 2011 at 4:13 PM, sunny agrawal sunny816.i...@gmail.comwrote:
Take an array of size of the length of the string.
fill the array positions with one
] then it means sum does not changes between a[i] to a[j]
so from i+1 to j there are equal no of 1's and -1's
or in other words equal no of 0's and 1's
On Sat, Jul 2, 2011 at 12:42 AM, Anika Jain anika.jai...@gmail.comwrote:
@sunny: in a[2,4] has 2 1s and one 0 then how is it a solution? i mean i
#define FUN(a,b,c)c t; t=a;a=b;b=t;
int main()
{
int a=2,b=3;
int *x,*y;
x=a,y=b;
FUN(x,y,int *);
printf(%d %d \n,a,b);
return 0;
}
why doesnt this macro swap pointers wen it can work for variables??
--
You received this message because you are subscribed to the
hey, printf(%d ya %u in both same error cming..
On Wed, Jun 29, 2011 at 5:10 PM, sunny agrawal sunny816.i...@gmail.comwrote:
Because u copied the code i think :P
try writing printf statement yourself again :)
On Wed, Jun 29, 2011 at 5:05 PM, Anika Jain anika.jai...@gmail.comwrote:
int main
, 2011 at 2:09 AM, vaibhav shukla
vaibhav200...@gmail.comwrote:
here is the generalized way
#includestdio.h
#define SIZEOF(var) (size_t)(var+1) - (size_t)(var)
main()
{
double x;
printf(The size of x is %d\n,SIZEOF(x));
return 0;
}
On Fri, Jun 24, 2011 at 1:35 AM, Anika Jain anika.jai
she died out of shock or heart attack..
On Fri, Jun 24, 2011 at 12:46 PM, Vishal Thanki vishaltha...@gmail.comwrote:
she got killed because of suffocation :P
On Fri, Jun 24, 2011 at 12:35 PM, Lavesh Rawat lavesh.ra...@gmail.com
wrote:
sherlock puzzle Solution - 24 june
A wife and her
1 - 100 of 125 matches
Mail list logo