Re: [algogeeks] Re: IBM-ISL

2011-09-02 Thread Reynald Suz
Thank you Navneet.

On Sat, Sep 3, 2011 at 8:34 AM, Navneet navneetn...@gmail.com wrote:

 I had an offer from IBM ISL, but i did not accept it.

 The interview is not very tough. They asked me standard questions like
 detecting loop in linked list, level order traversal etc.

 Though i appeared directly for interview and had to write no written
 test as i was interning there.

 On Sep 2, 6:54 pm, Reynald reynaldsus...@gmail.com wrote:
  Hi guys! If any of is familiar with IBM-ISL recruitment process and
  interview questions, please post. Thank 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 group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Regards
Reynald Reni
Masters in Software Engineering
CIT - India

-- 
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] Amazon - Interview Qn

2011-08-30 Thread Reynald Suz
Question:
Given: A singly linked list and a number 'n'.
Write a program, that will reverse consecutive 'n' nodes in the linked list.
Optimize for space and time.

Example:
Input:
Linked list: A-B-C-D-E-F
number 'n': 3

Output:
C-B-A-F-E-D


-- 
Regards
Reynald Reni
Masters in Software Engineering
CIT - India

-- 
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: longest repeated substring

2011-08-19 Thread Reynald Suz
Thanks for your blog post, *Shashank Mani * :)

On Fri, Aug 19, 2011 at 2:42 PM, WgpShashank shashank7andr...@gmail.comwrote:

 Hi Mac, Problem Have Discussed Several Time across various forums ,here one
 of the possible solution using Suffix Array in O(N^2)


 http://shashank7s.blogspot.com/2011/06/longest-repeated-substring-eg-maximum.html

 Hope it will be helpful, let me know for if any test case its not working
 or any better approach (Except Suffix Tree:)) exist

 *Thanks
 Shashank Mani
 Computer Science
 Birla Institute of Technology Mesra*



  --
 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/-/8H6L_b8qrbMJ.

 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
Reynald Reni
Masters in Software Engineering
CIT - India

-- 
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] Thoughtworks Coding Qn on Aug-8 2011

2011-08-09 Thread Reynald Suz
Please note:

   - Your OO design counts more marks, so, try to make use of well-known
   design principles
   - Your code should all easy modification. Eg: Dont use IF-ELSE.
   - Change management and feature extension in your code should be
   flexible.

In, Coding round you will be paired with a HR, during the process of coding
he will tell you all these and ask you to reflect them in code. He'll note
the way to respond to changes when he says. Sometime he might say something
ambiguous, he'll test ur feasibility analysis capability since they do
agile.

On Tue, Aug 9, 2011 at 11:12 AM, Reynald reynaldsus...@gmail.com wrote:

 ThoughtWorks is a global IT consultancy with an exclusive focus on end-
 to-end global software development and delivery using advanced tools,
 such as:

 Java / J2EE
 C# / .NET
 Ruby
 Agile Methodologies
 EAI technologies like Tibco, MQSeries  MSMQ
 Web Services

 The company's leadership in the practical application of agile methods
 on enterprise class projects allows its people to deliver higher
 quality solutions more quickly and cost effectively, while giving
 client business leaders greater program and project control.

 With about 1600 people and growing, ThoughtWorks is establishing
 itself as a world leader in delivering the most complex enterprise
 applications. Our clients represent the top tier of global industry,
 which are predominantly Global 1000 firms.

 We pride ourselves on hiring the best candidates possible.  Therefore,
 we have a very thorough hiring process.  In addition to the code
 review you are about to begin, we also administer logic and general
 aptitude assessments when you visit our office.  As a general rule, we
 have found that those who perform well on the reviews and assessments
 are better suited for the significant learning required by this
 position.

 Enclosed are two programming problems.  We ask that you read both
 descriptions thoroughly then create a program to solve **ONE** of the
 problems.  If you choose to do both problems, we will choose and
 evaluate only one of your solutions.

 ·   For the solution, we would want you use either Java, Ruby
 or C#.
 ·   We are interested in the DESIGN ASPECT of your solution
 and would like to evaluate your OBJECT ORIENTED PROGRAMMING SKILLS.
 ·   You may use external libraries or tools for building or
 testing purposes.  Specifically, you may use unit testing libraries or
 build tools available for your chosen language (e.g., JUnit, Ant,
 NUnit, NAnt, Test::Unit, Rake etc.)
 ·   Optionally, you may also include a brief explanation of
 your design and assumptions along with your code.
 ·   Kindly note that we are NOT expecting a web-based
 application or a comprehensive UI. Rather, we are expecting a simple,
 console based application and interested in your source code.

 Notes for C# developers:
 ·   For security reasons, please do NOT submit your C# code as
 a .msi file.
 ·   For convenience of reviewing, we request you NOT to use
 regions in the code.






 ==

 INTRODUCTION TO THE PROBLEMS

 All problems below require some kind of input. You are free to
 implement any mechanism for feeding input into your solution (for
 example, using hard coded data within a unit test).  You should
 provide sufficient evidence that your solution is complete by, as a
 minimum, indicating that it works correctly against the supplied test
 data.



 PROBLEM ONE: MARS ROVERS


 A squad of robotic rovers are to be landed by NASA on a plateau on
 Mars. This plateau, which is curiously rectangular, must be navigated
 by the rovers so that their on-board cameras can get a complete view
 of the surrounding terrain to send back to Earth.

 A rover's position and location is represented by a combination of x
 and y co-ordinates and a letter representing one of the four cardinal
 compass points. The plateau is divided up into a grid to simplify
 navigation. An example position might be 0, 0, N, which means the
 rover is in the bottom left corner and facing North.

 In order to control a rover, NASA sends a simple string of letters.
 The possible letters are 'L', 'R' and 'M'. 'L' and 'R' makes the rover
 spin 90 degrees left or right respectively, without moving from its
 current spot. 'M' means move forward one grid point, and maintain the
 same heading.

 Assume that the square directly North from (x, y) is (x, y+1).

 INPUT:
 The first line of input is the upper-right coordinates of the plateau,
 the lower-left coordinates are assumed to be 0,0.

 The rest of the input is information pertaining to the rovers that
 have been deployed. Each rover has two lines of input. The first line
 gives the rover's position, and the second line is a series of
 instructions telling the rover how to explore the plateau.

 The position is made up of two integers and a letter separated by
 spaces, corresponding to the x and y co-ordinates and the rover's
 orientation.

 

Re: [algogeeks] ThoghtWorks on campus

2011-08-08 Thread Reynald Suz
CTC: 5.8LPA

On Tue, Aug 9, 2011 at 12:19 AM, Ankur Garg ankurga...@gmail.com wrote:

 How much thought work pays..Can any1 tell ?


 On Mon, Aug 8, 2011 at 2:48 PM, vaibhav shukla vaibhav200...@gmail.comwrote:

 @raj : its about to come to our campus too..questions hv been uploaded
 already in grp. Do send the questions which they ask please



 On Tue, Aug 9, 2011 at 12:09 AM, raj kumar megamonste...@gmail.comwrote:

 hi friends ,
 thoughtworks is coming to our campus after two days.
 please send me the questions which they asked in your campuses.
 thanks

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




 --
   best wishes!!
 Vaibhav


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


  --
 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
Reynald Reni
Masters in Software Engineering
CIT - India

-- 
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] Help for Thoughworks

2011-08-03 Thread Reynald Suz
Sorry for the typo, Its Thoughtworks

On Wed, Aug 3, 2011 at 11:04 PM, Reynald reynaldsus...@gmail.com wrote:

 Hi folks!
  If any of you have Thoughworks flow questions, Coding rounds
 questions, Technical interview questions kindly please share. Thank
 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 group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Regards
Reynald Reni
Masters in Software Engineering
CIT - India

-- 
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] Thoughtworks Problems

2011-08-03 Thread Reynald Suz
Thank you Ramya.

On Wed, Aug 3, 2011 at 11:08 PM, ramya mv ramyamvasa...@gmail.com wrote:



 -- Forwarded message --
 From: ramya mv ramyamvasa...@gmail.com
 Date: Wed, Aug 3, 2011 at 1:10 AM
 Subject: Thoughtworks Problems
 To: coder.du...@gmail.com


 Hi,

 See to it...These are the samples for thoughtworks...work on these
 type of problems..

  --
 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
Reynald Reni
Masters in Software Engineering
CIT - India

-- 
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] Novell - Puzzle

2011-07-29 Thread Reynald Suz
Shivnarayan, why should we add all Fibonacci number? Since 1+1 both digits
represent the same cow. I think the last Fibonacci is the answer.
I'm sorry if I'm wrong.

On Fri, Jul 29, 2011 at 12:53 PM, Hemalatha 
hemalatha.amru...@googlemail.com wrote:

 @Shivnarayan

 As per the analysis from the number of cows produced from the she-calves of
 the 1st cow, I get the foll numbers:

 1+2+4+7+11+16+22+29+38+48+59+1(MainCow) = 238.

 Correct me If am wrong.

 Regards
 Hemalatha


 On Fri, Jul 29, 2011 at 11:45 AM, Reynald reynaldsus...@gmail.com wrote:

 If a cow produces its first she-calf at age two years and after that
 produces another single she-calf every year, how many she-calves are
 there after 12 years? assuming none die.

 and a similar one, asked to another guy,

 Suppose a newly-born pair of rabbits, one male, one female, are put in
 a field. Rabbits are able to mate at the age of one month so that at
 the end of its second month a female can produce another pair of
 rabbits. 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. How many pairs will there be in one year?

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




 --



  --
 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
Reynald Reni
Masters in Software Engineering
CIT - India

-- 
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] Novell - Technical Interview

2011-07-29 Thread Reynald Suz
Rajeev, I think 'vmlinuz' file in /boot directory is the symbolic link to
kernel.

On Fri, Jul 29, 2011 at 9:45 AM, rajeev bharshetty rajeevr...@gmail.comwrote:

 1 )System map in Linux is a Symbol table used by the kernel.
 Mapping of symbol names and addresses.

 2 ) IS it /usr/src/linux ???

 On Fri, Jul 29, 2011 at 8:10 AM, Reynald reynaldsus...@gmail.com wrote:

 1. What is a System Map file in Linux? Why do we need it?
 2. Mention the file name which is a symbolic link to the system kernel.

 --
 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
 Rajeev N B http://www.opensourcemania.co.cc

 *Winners Don't do Different things , they do things Differently*

  --
 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
Reynald Reni
Masters in Software Engineering
CIT - India

-- 
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: Novell - Puzzle

2011-07-29 Thread Reynald Suz
Thank ya shiv, agarwal and Anders.

On Sat, Jul 30, 2011 at 8:10 AM, Anders Ma xuejiao...@gmail.com wrote:

 anders@anders-Satellite-U400:~/puzzle$ cat novel_she_calf.c
 #include stdio.h

 /*
 iIf a cow produces its first she-calf at age two years and after that
 produces another single she-calf every year, how many she-calves are
 there after 12 years? assuming none die.
 */

 unsigned int she_calves(unsigned int year)
 {
unsigned int one_year = 0;
unsigned int two_year = 1;
unsigned int tmp;

while (year--) {
tmp = one_year;
one_year += two_year;
two_year = tmp;
}
return one_year + two_year - 1;
 }

 int main (int argc, char** argv)
 {
unsigned int number;

if (argc != 2) {
printf([usage]: she_calves [year]\n);
return 0;
}
number = she_calves(atoi(argv[1]));
printf(After %d years, she-calves number is %d\n, atoi(argv[1]),
 number);
 }
 anders@anders-Satellite-U400:~/puzzle$ gcc novel_she_calf.c -o she_calves
 anders@anders-Satellite-U400:~/puzzle$ ./she_calves 12
 After 12 years, she-calves number is 232
 anders@anders-Satellite-U400:~/puzzle$



 --
 Regards
 Anders

 --
 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
Reynald Reni
Masters in Software Engineering
CIT - India

-- 
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] swapping 2 variables without using temporary variables

2011-07-28 Thread Reynald Suz
Try this out, Venkat

a^=b^=a^=b; (XORing)

On Fri, Jul 29, 2011 at 11:09 AM, tech rascal techrascal...@gmail.comwrote:

 one method is-
 a=a+b;
 b=a-b;
 a=a-b;

 is there any other method???

 --
 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
Reynald Reni
Masters in Software Engineering
CIT - India

-- 
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: [offTopic] Any one attended Informatica Interview

2011-07-24 Thread Reynald Suz
Congrats! Which team did pick you up? Global Customer Support, Dev or
Testing  QA.

On Sun, Jul 24, 2011 at 9:57 PM, Rahul Menon menonrahul1...@gmail.comwrote:

 I am placed! :)

 On Jul 20, 9:43 pm, Reynald Suz reynaldsus...@gmail.com wrote:
  Round-1 :Aptitude (OS, SQL, Data Structures  Problem Solving)
  Round-2: Technical Interview - (Qns from UNIX/DB/Algorithms)
  Round-3: Technical Interview - (Qns with regard to projects you have
 done)
  Round-4: HR interview
 
  On Wed, Jul 20, 2011 at 9:25 PM, Rahul Menon menonrahul1...@gmail.com
 wrote:
 
   I would like if any here have attended informatica interview
   and also about the interview procedure.
 
   --
   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
  Reynald Reni
  Masters in Software Engineering
  CIT - India

 --
 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
Reynald Reni
Masters in Software Engineering
CIT - India

-- 
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: Amazon

2011-07-24 Thread Reynald Suz
Please post Thoughtworks question. Thanks.

On Mon, Jul 25, 2011 at 12:51 AM, priyanka goel priya888g...@gmail.comwrote:

 if any1 can post Oracle Apps questions.. pl 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.




-- 
Regards
Reynald Reni
Masters in Software Engineering
CIT - India

-- 
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] Unique characters in a string

2011-07-23 Thread Reynald Suz
This code works perfectly. Try out with different test data.
int main()
{
//char str[]=qwertyuioplkjhgfdsazxcvbnm;
char str2[] = qwertyquejolpd;
int val, i;
int len = strlen(str);
int unique=1;
int checker=0;
for(=0;ilen;i++)
{
   val = str[i]-'a';
  if( (checker  (1val))  0 )
  {
 printf(\nNo, there aren't unique.);
 unique=0;
 break;
  }
   checker |= (1val);
}
if(unique==1)
 printf(\nUnique charaters.);
return 1;
}


On Sat, Jul 23, 2011 at 12:18 PM, rajeev bharshetty rajeevr...@gmail.comwrote:

 @Victor : Counting sort uses extra data structures to maintain the count
 and the output array , so it is not viable I think ?? what say ??


 On Sat, Jul 23, 2011 at 11:04 AM, Victor Manuel Grijalva Altamirano 
 kavic1.mar...@gmail.com wrote:

 Use a type of counting sort with ascii


 2011/7/22 SkRiPt KiDdIe anuragmsi...@gmail.com

 Use 8 mask integers or 4 LL to cover the complete ascii range.

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




 --
 Victor Manuel Grijalva Altamirano
 Universidad Tecnologica de La Mixteca

  --
 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
 Rajeev N B http://www.opensourcemania.co.cc


  --
 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
Reynald Reni
Masters in Software Engineering
CIT - India

-- 
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] C - pre post increment

2011-07-21 Thread Reynald Suz
I tried in Dev C++,code-B executes infinitely. Why?

On Thu, Jul 21, 2011 at 4:13 PM, Gaurav Popli abeygau...@gmail.com wrote:

 dont you think it is illegal using x=x-- or x=--x;??

 On Thu, Jul 21, 2011 at 2:56 PM, karthiga m karthichandr...@gmail.com
 wrote:
  in code  A using pr e- decrement  therefore i gets decremented when
  checking while condition so
  it will print as 9 8 7  6 5 4 3 2 1 .
  in code B using post-decrement  it will prints like 9 8 7 6 5 4 3 2 1 0
  here why zero printing means while checking while condition x-- have
  previous value..therefore at tht time x-- is 1 so while condition
  executing and prints x value as zero.
 
  On 7/21/11, Reynald reynaldsus...@gmail.com wrote:
  Code: A
  int main()
  {
  int x = 10;
  while ( x = --x)
  printf(  %d , x);
  getchar();
  }
 
  Code: B
  int main()
  {
  int x = 10;
  while ( x = x--)
  printf(  %d , x);
  getchar();
  }
 
  Does Code-A and Code-B work similar? Justify.
 
  --
  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.
 
 
 
  --
  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.
 
 

 --
 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
Reynald Reni
Masters in Software Engineering
CIT - India

-- 
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] Microsoft Qn: Algo to find the border of a binary tree

2011-07-16 Thread Reynald Suz
Sagar;s Algo works, thank you so much guys.

On Sun, Jul 17, 2011 at 3:41 AM, SkRiPt KiDdIe anuragmsi...@gmail.comwrote:

 A pre-order traversal which is used to index the (min,max) pair value
 at each level except the bottom-most level where all the entries are
 to be printed. O(n) time O(log n) memory.

 On 7/17/11, swetha rahul swetharahu...@gmail.com wrote:
  Sagar , Shubam Maheshwari
Thanks!!
 
  On Sun, Jul 17, 2011 at 1:11 AM, sagar pareek sagarpar...@gmail.com
 wrote:
 
  yup :)
 
 
  On Sun, Jul 17, 2011 at 1:03 AM, Shubham Maheshwari 
  shubham.veloc...@gmail.com wrote:
 
  according to saagar's algo, it'll be printed ...
 
 
  On Sun, Jul 17, 2011 at 1:02 AM, swetha rahul
  swetharahu...@gmail.comwrote:
 
  @Reynald
  Will 75 not be included in the tree that u
  have given..??
 
 
  On Sun, Jul 17, 2011 at 12:49 AM, sagar pareek
  sagarpar...@gmail.comwrote:
 
  here is the code
  void border(node*);
  void recur(node*);
 
  void border(node *ptr)
  {
   node* tmp; int stack[20],top=0;
   if(tmp=ptr-left)
   {
while(tmp-left)
{
 printf(%d ,tmp-data);
 tmp=tmp-left;
}
   }
   recur(ptr);
   if(tmp=ptr-right)
   {
while(tmp-right)
{
 stack[top++]=tmp-data;
 tmp=tmp-right;
}
   }
   while(top--) printf(%d ,stack[top]);
   printf(%d\n,ptr-data);
  }
 
  void recur(node* ptr)
  {
   if(ptr-left) recur(ptr-left);
   if(!ptr-left!ptr-right) printf(%d ,ptr-data);
   if(ptr-right)   recur(ptr-right);
 
  }
 
  On Sat, Jul 16, 2011 at 7:07 PM, Reynald
  reynaldsus...@gmail.comwrote:
 
  Algo to find the border of a given binary tree. Optimized for space
  and time.
  Input:
   10
/ \
  50 50
 /  \ /   \
   25  75   20020
   / \   /  /\
  15 35   120155   250
 
  Output:50 25 15 35 120 155 250 20 150 10
 
  --
  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
  SAGAR PAREEK
  COMPUTER SCIENCE AND ENGINEERING
  NIT 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.
 
 
   --
  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.
 
 
 
 
  --
  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, send email to
  algogeeks+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/algogeeks?hl=en.
 
 
 
 
  --
  **Regards
  SAGAR PAREEK
  COMPUTER SCIENCE AND ENGINEERING
  NIT 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.
 
 
  --
  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.
 
 

 --
 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
Reynald Reni
Masters in Software Engineering
CIT - India

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

Re: [algogeeks] Microsoft Qn: Algo to find the border of a binary tree

2011-07-16 Thread Reynald Suz
Yep!

On Sun, Jul 17, 2011 at 1:02 AM, swetha rahul swetharahu...@gmail.comwrote:

 @Reynald
 Will 75 not be included in the tree that u have
 given..??


 On Sun, Jul 17, 2011 at 12:49 AM, sagar pareek sagarpar...@gmail.comwrote:

 here is the code
 void border(node*);
 void recur(node*);

 void border(node *ptr)
 {
  node* tmp; int stack[20],top=0;
  if(tmp=ptr-left)
  {
   while(tmp-left)
   {
printf(%d ,tmp-data);
tmp=tmp-left;
   }
  }
  recur(ptr);
  if(tmp=ptr-right)
  {
   while(tmp-right)
   {
stack[top++]=tmp-data;
tmp=tmp-right;
   }
  }
  while(top--) printf(%d ,stack[top]);
  printf(%d\n,ptr-data);
 }

 void recur(node* ptr)
 {
  if(ptr-left) recur(ptr-left);
  if(!ptr-left!ptr-right) printf(%d ,ptr-data);
  if(ptr-right)   recur(ptr-right);

 }

 On Sat, Jul 16, 2011 at 7:07 PM, Reynald reynaldsus...@gmail.com wrote:

 Algo to find the border of a given binary tree. Optimized for space
 and time.
 Input:
  10
   / \
 50 50
/  \ /   \
  25  75   20020
  / \   /  /\
 15 35   120155   250

 Output:50 25 15 35 120 155 250 20 150 10

 --
 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
 SAGAR PAREEK
 COMPUTER SCIENCE AND ENGINEERING
 NIT 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.


  --
 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
Reynald Reni
Masters in Software Engineering
CIT - India

-- 
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] Can any one please post the questions they faced during Amazon campus recruitment both online test and the interview rounds??

2011-07-14 Thread Reynald Suz
Hope this blog helps a little:
http://amazon-interview-questions.blogspot.com/

On Thu, Jul 14, 2011 at 12:36 PM, sinhanurag sinhanu...@hotmail.com wrote:

 Can any one please post the questions they faced during Amazon campus
 recruitment both online test and the interview rounds??

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




-- 
Cheers
Reynald Reni

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