Re: [algogeeks] Re: puzzle

2011-08-26 Thread SuDhir mIsHra
i hope now it clear:


[image: Screenshot.png]

-- 
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.

Screenshot.png

Re: [algogeeks] Regarding my posts

2011-08-25 Thread SuDhir mIsHra
lol

-- 
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.



[algogeeks]

2011-08-25 Thread SuDhir mIsHra
main()

{

int a=10,20;

a^=b^=a^=b;

printf(%d\n %d\n,a,b);

-- 
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.



[algogeeks] why the output 16

2011-08-21 Thread SuDhir mIsHra
#includestdio.h
#define FUNC1(i) (i*(i-1))
#define FUNC2(i) (i==0?1:i*FUNC1(i-1))
main()
{
int i=8;


printf(\n%d,FUNC2(i));
}

-- 
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.



[algogeeks] c programe explain

2011-08-21 Thread SuDhir mIsHra
funct(char* str)
{
printf(%s\n,str);
}
main()
{
static int ii = 1;
int jj = 5;
ii+=++jj;
funct(ii+++Campus Interview);
}

-- 
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.



Re: [algogeeks] Re: fork() question

2011-08-14 Thread SuDhir mIsHra
2)
int main()
{
fork();
fork();
fork();
fork()
printf(Hello world!);
}

 a.out─┬─a.out─┬─a.out─┬─a.out───a.out
  │   │   └─a.out
  │   ├─a.out───a.out
  │   └─a.out
  ├─a.out─┬─a.out───a.out
  │   └─a.out
  ├─a.out───a.out
  └─a.out
16 times;

-- 
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.



[algogeeks] what is mean by %2.3d in scanf

2011-08-13 Thread SuDhir mIsHra
e g: scanf(%2.4d,a);

-- 
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.



Re: [algogeeks] Re: adobe written round que

2011-07-29 Thread Sudhir mishra
int divideby3 (int num)
{
  int sum = 0;
  while (num  3) {
sum += num  2;
num = (num  2) + (num  3);
  }
  if (num == 3) ++sum;
  return sum;
}


Thanks  Regards...*
รυ∂んเя мเรんяค*

-- 
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.



[algogeeks] Sudhir mishra wants to chat

2011-07-21 Thread Sudhir mishra
---

Sudhir mishra wants to stay in better touch using some of Google's coolest new
products.

If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-62d5befb93-80d907c33d-qc8z-Uscge2hvBwQ28GKNjP8hvc
You'll need to click this link to be able to chat with Sudhir mishra.

To get Gmail - a free email account from Google with over 2,800 megabytes of
storage - and chat with Sudhir mishra, visit:
http://mail.google.com/mail/a-62d5befb93-80d907c33d-qc8z-Uscge2hvBwQ28GKNjP8hvc

Gmail offers:
- Instant messaging right inside Gmail
- Powerful spam protection
- Built-in search for finding your messages and a helpful way of organizing
  emails into conversations
- No pop-up ads or untargeted banners - just text ads and related information
  that are relevant to the content of your messages

All this, and its yours for free. But wait, there's more! By opening a Gmail
account, you also get access to Google Talk, Google's instant messaging
service:

http://www.google.com/talk/

Google Talk offers:
- Web-based chat that you can use anywhere, without a download
- A contact list that's synchronized with your Gmail account
- Free, high quality PC-to-PC voice calls when you download the Google Talk
  client

We're working hard to add new features and make improvements, so we might also
ask for your comments and suggestions periodically. We appreciate your help in
making our products even better!

Thanks,
The Google Team

To learn more about Gmail and Google Talk, visit:
http://mail.google.com/mail/help/about.html
http://www.google.com/talk/about.html

(If clicking the URLs in this message does not work, copy and paste them into
the address bar of your browser).

-- 
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.



Re: [algogeeks] Google Interview Question

2011-05-30 Thread Sudhir mishra
give some explanation

-- 
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.



Re: [algogeeks] Re: If any one have algorithms for interviews by adnan aziz ebook... Please mail ...

2011-04-30 Thread Sudhir mishra
sudhir08.mis...@gmail.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@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.



Re: [algogeeks] Re: give solution(logic)

2011-04-26 Thread Sudhir mishra
now post

-- 
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.



[algogeeks] give solution(logic)

2011-04-25 Thread Sudhir mishra
** Make NECESSARY assumptions.



 .Kingdom of *Maplewood* is a beautiful country comprising of a lot of small
islands of different areas. All the islands are in a straight row. King *
Rosewood* is getting old and has decided to divide the islands among his two
sons - *Eric* and *Finn*. Luckily, the total number of islands is even. He
has also decided a few rules for the division of islands:

i) *Eric* and *Finn* will be given alternate turns to choose the islands.

ii) They can only choose one island at a time from either the beginning or
the end of the row of islands.

iii) Once an island is chosen by someone,it cannot be chosen by other
person.



Suppose you are *Eric* and you are given the first choice. Find out the
maximum area you are sure you can pick.

-- 
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.



[algogeeks] Re: give solution(logic)

2011-04-25 Thread Sudhir mishra
give soon

-- 
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.



Re: [algogeeks] Re: give solution(logic)

2011-04-25 Thread Sudhir mishra
why

-- 
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.



Re: [algogeeks]

2011-04-21 Thread Sudhir mishra
yes there is error;
first allocate memory for p;


On Thu, Apr 21, 2011 at 6:44 AM, riti gupta ritigupt...@gmail.com wrote:

 is there any error in following code?

 main
 {
  char *p=hello;
 p[0]='j';
 p[1]='j';
 puts(p);
 }

 --
 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.




-- 

[image: motilal.JPG]
Thanks  Regards...*
SUDHIR MISHRA sudhir08.mis...@gmail.com*
*IT 3rd YEAR*
*Motilal Nehru National institute Of Technology-ALLAHABAD.
*

-- 
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.

motilal.JPG

[algogeeks] give answer

2011-03-10 Thread Sudhir mishra
Ques: What is Abstract Classes?
Ques:What is interfaces?
Ques:What is difference between abstract classes and interfaces?
Ques:Give an example where do you use interfaces and abstract classes?

-- 
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.



[algogeeks] virtual memory

2011-03-09 Thread Sudhir mishra
virtual memory allows us to run processes of size more than RAM. Is there
any other use of virtual memory?
can ever achieve greatly.

-- 
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.



[algogeeks] binary search for Linked List?

2011-03-08 Thread Sudhir mishra
Is it possible to implement

-- 
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.



Re: [algogeeks] Re: binary tree, nodes, each node has an ID

2011-03-04 Thread Sudhir mishra
what is rmq

On Fri, Mar 4, 2011 at 7:21 AM, Vipin Agrawal vipin.iitr@gmail.comwrote:

 There are many way to find out least common ancestor.
 Best Solution is RMQ.

 On Mar 4, 3:59 pm, Sudhir mishra sudhir08.mis...@gmail.com wrote:
  binary tree, nodes, each node has an ID
 
   root node of the tree
 
  structure node{
 
  int id;
 
  node  *left;
 
  node  *right;}
 
  - problem: given node id 1, and node id 2, determine the
  lowest common ancestor of these 2 nodes
 
  - input:
  id1, id2, root
 
  - out: node
  id of this ancestor node
 
  --
 
 
  *
  *
  Thanks  Regards...*
  SUDHIR MISHRA sudhir08.mis...@gmail.com*
  *IT 3rd YEAR*
  *Motilal Nehru National institute Of Technology-ALLAHABAD.
 
  *

 --
 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.




-- 

*
*
Thanks  Regards...*
SUDHIR MISHRA sudhir08.mis...@gmail.com*
*IT 3rd YEAR*
*Motilal Nehru National institute Of Technology-ALLAHABAD.

*

-- 
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.



[algogeeks] Storing 1 million phone numbers

2011-02-28 Thread Sudhir mishra
 best way , Memory-wise, to store 10 Crores mobile numbers ?

 this is an interview question of Google.its a bit too easy.

-- 

*
*
Thanks  Regards...*
*Sudhir Mishra
*IT 3rd YEAR*
*Motilal Nehru National institute Of Technology-ALLAHABAD.

*

-- 
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.



Re: [algogeeks] Storing 1 million phone numbers

2011-02-28 Thread Sudhir mishra
please explain what is trie

-- 
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.



[algogeeks] SUDHIR MISHRA wants to chat

2011-02-15 Thread SUDHIR MISHRA
---

SUDHIR MISHRA wants to stay in better touch using some of Google's coolest new
products.

If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-62d5befb93-3fceb99bf3-oYX-pec-NCYCzMLIBV7yRJ6EMUI
You'll need to click this link to be able to chat with SUDHIR MISHRA.

To get Gmail - a free email account from Google with over 2,800 megabytes of
storage - and chat with SUDHIR MISHRA, visit:
http://mail.google.com/mail/a-62d5befb93-3fceb99bf3-oYX-pec-NCYCzMLIBV7yRJ6EMUI

Gmail offers:
- Instant messaging right inside Gmail
- Powerful spam protection
- Built-in search for finding your messages and a helpful way of organizing
  emails into conversations
- No pop-up ads or untargeted banners - just text ads and related information
  that are relevant to the content of your messages

All this, and its yours for free. But wait, there's more! By opening a Gmail
account, you also get access to Google Talk, Google's instant messaging
service:

http://www.google.com/talk/

Google Talk offers:
- Web-based chat that you can use anywhere, without a download
- A contact list that's synchronized with your Gmail account
- Free, high quality PC-to-PC voice calls when you download the Google Talk
  client

We're working hard to add new features and make improvements, so we might also
ask for your comments and suggestions periodically. We appreciate your help in
making our products even better!

Thanks,
The Google Team

To learn more about Gmail and Google Talk, visit:
http://mail.google.com/mail/help/about.html
http://www.google.com/talk/about.html

(If clicking the URLs in this message does not work, copy and paste them into
the address bar of your browser).

-- 
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.



Re: [algogeeks] Re: question at K10

2011-02-15 Thread SUDHIR MISHRA
nice solution

-- 
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.



[algogeeks] SUDHIR MISHRA wants to chat

2011-02-09 Thread SUDHIR MISHRA
---

SUDHIR MISHRA wants to stay in better touch using some of Google's coolest new
products.

If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-62d5befb93-a1202cc5cd-5oEiMcLpaEPVY-UR9eGSSYdrezQ
You'll need to click this link to be able to chat with SUDHIR MISHRA.

To get Gmail - a free email account from Google with over 2,800 megabytes of
storage - and chat with SUDHIR MISHRA, visit:
http://mail.google.com/mail/a-62d5befb93-a1202cc5cd-5oEiMcLpaEPVY-UR9eGSSYdrezQ

Gmail offers:
- Instant messaging right inside Gmail
- Powerful spam protection
- Built-in search for finding your messages and a helpful way of organizing
  emails into conversations
- No pop-up ads or untargeted banners - just text ads and related information
  that are relevant to the content of your messages

All this, and its yours for free. But wait, there's more! By opening a Gmail
account, you also get access to Google Talk, Google's instant messaging
service:

http://www.google.com/talk/

Google Talk offers:
- Web-based chat that you can use anywhere, without a download
- A contact list that's synchronized with your Gmail account
- Free, high quality PC-to-PC voice calls when you download the Google Talk
  client

We're working hard to add new features and make improvements, so we might also
ask for your comments and suggestions periodically. We appreciate your help in
making our products even better!

Thanks,
The Google Team

To learn more about Gmail and Google Talk, visit:
http://mail.google.com/mail/help/about.html
http://www.google.com/talk/about.html

(If clicking the URLs in this message does not work, copy and paste them into
the address bar of your browser).

-- 
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.



Re: [algogeeks] Re: fedora 12

2011-02-08 Thread SUDHIR MISHRA
o k---thanks mittal

-- 
Thanks  Regards...*
*Sudhir Mishra
*IT 3rd YEAR*
*Motilal Nehru National institute Of Technology-ALLAHABAD.

*

-- 
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.



[algogeeks] fedora 12

2011-02-07 Thread SUDHIR MISHRA
help to install-
Fedora O S by 4 gb pendrive

-- 
Thanks  Regards...*
*Sudhir Mishra
*IT 3rd YEAR*
*Motilal Nehru National institute Of Technology-ALLAHABAD.

*

-- 
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.



[algogeeks] GATE

2011-01-15 Thread SUDHIR MISHRA
sugest study material for gate 2011

-- 
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.



Re: [algogeeks] Fwd: [ƒƒÖ]™ HaPpY NeW YeAr 2011

2011-01-01 Thread sudhir mishra
thank u,wish u the same


-- 
*
Thanks  Regards...
Sudhir Mishra
undergraduate student,
Department Of **Computer Science and engineering,*
*Motilal Nehru National institute Of Technology-ALLAHABAD.

*

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] sudhir mishra wants to chat

2010-12-29 Thread sudhir mishra
---

sudhir mishra wants to stay in better touch using some of Google's coolest new
products.

If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-62d5befb93-c4270e4073-gZW-XtMwbOw3w3XU9CHGZ6uR5ZQ
You'll need to click this link to be able to chat with sudhir mishra.

To get Gmail - a free email account from Google with over 2,800 megabytes of
storage - and chat with sudhir mishra, visit:
http://mail.google.com/mail/a-62d5befb93-c4270e4073-gZW-XtMwbOw3w3XU9CHGZ6uR5ZQ

Gmail offers:
- Instant messaging right inside Gmail
- Powerful spam protection
- Built-in search for finding your messages and a helpful way of organizing
  emails into conversations
- No pop-up ads or untargeted banners - just text ads and related information
  that are relevant to the content of your messages

All this, and its yours for free. But wait, there's more! By opening a Gmail
account, you also get access to Google Talk, Google's instant messaging
service:

http://www.google.com/talk/

Google Talk offers:
- Web-based chat that you can use anywhere, without a download
- A contact list that's synchronized with your Gmail account
- Free, high quality PC-to-PC voice calls when you download the Google Talk
  client

We're working hard to add new features and make improvements, so we might also
ask for your comments and suggestions periodically. We appreciate your help in
making our products even better!

Thanks,
The Google Team

To learn more about Gmail and Google Talk, visit:
http://mail.google.com/mail/help/about.html
http://www.google.com/talk/about.html

(If clicking the URLs in this message does not work, copy and paste them into
the address bar of your browser).

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] help me solve this problem

2010-12-25 Thread sudhir mishra
**https://www.spoj.pl/problems/MCARDS/en/
-- 
-- 
regards
*Sudhir Mishra*
MNNIT ALLAHABAD

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Debugging questions

2010-11-13 Thread sudhir mishra
*1st programe give output:199 but 2nd give Segmentation fault why* onle
change in return

*1)*  int fun(int i)
{
  if ( i%2 ) *return (i++);*
  else return fun(fun( i - 1 ));
}
int main()
{
  printf( %d , fun(200));
  getchar();
  return 0;
}

*2) *int fun(int i)
{
  if ( i%2 ) *return (++i);*
  else return fun(fun( i - 1 ));
}

int main()
{
  printf( %d , fun(200));
  getchar();
  return 0;
}



-- 
-- 
regards
*Sudhir Mishra*
MNNIT ALLAHABAD

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Learn

2010-11-12 Thread sudhir mishra
Write a program to swap odd and even bits in an unsigned integer with as few
instructions as possible (e.g., bit 0 and bit 1 are swapped, bit 2 and bit 3
are swapped, etc).

eg[?]
input---
1234567
7654321
888

output--
411
12109682
948




-- 
regards
*Sudhir Mishra*
MNNIT ALLAHABAD

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

B60.gif

Re: [algogeeks] Re: Max pyramid path

2010-11-07 Thread sudhir mishra
c implementationpath in pyramid
we come botom to up -
eg:store like it(_we go ether right or down))
1
1 2
1 2 3
=
step 2)  6
step 1)  3 5
1 2 3

---
#includestdio.h
int a[100][100];

void solve(int m)
{
int t1,t2,j1;

if(m==-1)
printf(%d\n,a[0][0]);
else{
for(j1=0;j1=m;j1++)
{
t1=a[m][j1]+a[m+1][j1];
t2=a[m][j1]+a[m+1][j1+1];
a[m][j1]=t1t2?t1:t2;}
solve(m-1);
}}
int main()
{
int i,j,re,n;




sudhir
scanf(%d,n);
for(i=0;in;i++)
{
for(j=0;j=i;j++)
{

scanf(%d,a[i][j]);
}}
solve(n-2);

return 0;
}



SUDHIR
MNNIT ALLAHABAD--

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.