Re: [algogeeks] Re: symantec

2011-09-28 Thread swetha rahul
@ Rashmi thanks a lot

On Thu, Sep 29, 2011 at 8:49 AM, siva viknesh sivavikne...@gmail.comwrote:

 @rashmi .thanks of lot for sharing.It would be of great
 help if u detail much about written test pattern and share the
 questions whatever u remember...thanks in advance..

 On Sep 29, 6:40 am, sush57 sushaant...@gmail.com wrote:
  didsymanteccome to your col...how many did they shortlist in first
  rounds...can u say pattern of written test...
 
  On Sep 28, 11:30 pm, rashmi i rash...@gmail.com wrote:
 
 
 
 
 
 
 
   they have a package of around 5.8 in hand. they have a written test
 followed
   by 2-3 interviews.The written test questions belonged to previous years
 GATE
   questions. The interviews were easier and the questions ranged  from
 OS, OOP
   concepts, Java, Databases.
 
   On Wed, Sep 28, 2011 at 12:09 AM, swetha rahul 
 swetharahu...@gmail.comwrote:
 
can anyone tell the recruitment procedure ofsymantec?
what is the package?
 
--
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.
 
   --
   R@$!-!
   DoN'T LimIt Ur cHaLlEngeS, ChAlLenGe uR LImItS.

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



[algogeeks] symantec

2011-09-27 Thread swetha rahul
can anyone tell the recruitment procedure of symantec?
what is the package?

-- 
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] probability question

2011-08-31 Thread swetha rahul
In a railway station, there are two trains going. One in the harbour line
and one in the main line, each having a frequency of 10 minutes. The main
line service starts at 5 o'clock and the harbour line starts at 5.02A.M. A
man goes to the station every day to catch the first train that comes.What
is the probability of the man catching the first
train?

-- 
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] SAP LABS

2011-08-30 Thread swetha rahul
Hi,
What is the interview procedure for SAP LABS..?? What is the
written test procedure... Please do reply if you know.. Thanks in
advance..

-- 
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] Sum from array

2011-08-07 Thread swetha rahul
Given an array find all the set which form the given sum  in O(n)

i/p: a[]={1,2,3,5,7,6,8,10}
sum=9

o/p should be {1,3,5} {2,7} {3,6},{1,8}

-- 
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] Paypal interview Questions

2011-08-06 Thread swetha rahul
Hi,

Q.No:1
 what is wrong here
void foo(int x=10,int y)
how compiler will treat it??
and what happen here
void foo(int x=10,int y=20)

Q.No:2
How to remove duplicate elements from an array in just one pass.. Take care
of time and space complexity..

-- 
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] Longest matching substring

2011-08-06 Thread swetha rahul
Hi,
 How to find the longest matching substring in 2 arrays..

Say we have 2 strings,
str1=abcdefghi and str2=iabcdefgk the answer must be abcdefg

-- 
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] Paypal

2011-08-06 Thread swetha rahul
Hi,
   Can anybody say what is the wriiten test pattern of paypal... :-)
What kind of questions are asked ??

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

2011-08-06 Thread swetha rahul
Thanks Siva... Is it all MCQ or they ask us to code for a problem..??
On Sat, Aug 6, 2011 at 7:35 PM, siva viknesh sivavikne...@gmail.com wrote:

 Paypal is a subsidiary of ebay .. so i think mostly java .. SCJP
 level !!

 On Aug 6, 6:52 pm, swetha rahul swetharahu...@gmail.com wrote:
  Hi,
 Can anybody say what is the wriiten test pattern of paypal...
 :-)
  What kind of questions are asked ??

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



[algogeeks] Java Output

2011-08-06 Thread swetha rahul
Hi,
class C{
static int f1(int i) {
System.out.print(i + ,);
return 0;
}
public static void main (String[] args) {
int i = 0;
i = i++ + f1(i);
System.out.print(i);
}}


Why does this print 1,0..?? Please explain...

-- 
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] Morgan Stanley

2011-08-03 Thread swetha rahul
Hi,
  Can anyone say about the interview process of Morgan
Stanley..What kind of questions are asked in written test..??Thanks in
advance..

-- 
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: Directi on campus

2011-08-03 Thread swetha rahul
unix was their main interest..may be u can clear the written without knowing
unix..but not the interview..the complete recruitment process was based only
on unix and networks..nothing else..

On Wed, Aug 3, 2011 at 11:59 PM, abhishek kumar 
mailatabhishekgu...@gmail.com wrote:

 @aditi: i didn't got, what you said..

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

 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.



[algogeeks] Directi Ques

2011-07-29 Thread swetha rahul
Hi,
given a complete binary tree (either a node is a leaf node or
has two children)

every leaf node has value 0 or 1.
every internal node has value as the AND gate or OR gate.
you are given with the tree and a value V.
you have to output the minimum number of flips (AND to OR or OR to AND) if
the evaluated value is not equal to V, if it is equal return 0, if not
possible return -1.
you can just change the value of internal nodes i.e can make and to or , or
to and to get the desired output
give the minimum number of flips required to get the desired output.

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

2011-07-26 Thread swetha rahul
Hi,
Print all the substrings of a given string. Is there any
solution better than O(n^2).

Eg: abc the possible substrings are {a,b,c,ab,bc,abc}

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

2011-07-26 Thread swetha rahul
Dipankar, Thanks!!!

On Tue, Jul 26, 2011 at 8:44 AM, Dipankar Patro dip10c...@gmail.com wrote:


 Swetha,

 '\' in C is used to denote a escape sequence in C strings (and also in many
 other languages).
 e.g '\n' is for New Line '\n' is counted as one character.
 Now '\ooo' is for an ASCII in octal representation.
 here is the list of all escape sequences:
 http://msdn.microsoft.com/en-us/library/h21280bw(v=vs.80).aspx

 So for your string : \12345s\n
 here '\123' is an ASCII in octal, hence one character.
 rest you know about the characters: so length = '\123'(1) + 3 + '\n'(1) =
 5.

 I suggest you try with other combinations with '\' and print the output.
 They will definitely show some weird stuffs :)

 Hope that helps.
 On 25 July 2011 22:53, swetha rahul swetharahu...@gmail.com wrote:

 char *s=\12345s\n;
 printf(\n %d,strlen(s));

 The output is 5...?? But how.??

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




 --

 ___

 Please do not print this e-mail until urgent requirement. Go Green!!
 Save Papers = Save Trees

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



[algogeeks] C Output

2011-07-25 Thread swetha rahul
Hi,

int main()
{
int a[5]={1,2,3,4,5};
int *ptr=a+1;
printf(%d,*(ptr-1));
}

It prints 5... Can somebody explain wats happening here..?

-- 
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 DIRECT-I !!!!!!

2011-07-25 Thread swetha rahul
Guys pls dont reveal the placements schedule of AU here... Hope u knw dat v
r instructed not to do so..

On Mon, Jul 25, 2011 at 7:47 PM, Mani Bharathi manibharat...@gmail.comwrote:

 ya :) :)

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

 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.



Re: [algogeeks] C Output

2011-07-25 Thread swetha rahul
int main()
{
int a[5]={1,2,3,4,5};
int *ptr=a;
printf(%d,*(ptr));
getch();
}

Then why this prints 1.. ??

On Mon, Jul 25, 2011 at 7:50 PM, sagar pareek sagarpar...@gmail.com wrote:

 here a is data type with 5*sizeof(int)
 so a+1 will give u next address just after the alloted whole array


 On Mon, Jul 25, 2011 at 7:44 PM, swetha rahul swetharahu...@gmail.comwrote:

 Hi,

 int main()
 {
 int a[5]={1,2,3,4,5};
 int *ptr=a+1;
 printf(%d,*(ptr-1));
 }

 It prints 5... Can somebody explain wats happening here..?

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



Re: [algogeeks] C Output

2011-07-25 Thread swetha rahul
Thanks all... Got it!!!

On Mon, Jul 25, 2011 at 8:29 PM, Vijay Khandar vijaykhand...@gmail.comwrote:

 ptr points to base addr of a.And on base adrr of a is 1.Assume base addr of
 a is 4000 then 1-4000,2-4002,3-4004,4-4006 and 5 on 4008 so op 1if in
 question asking *(ptr+2) then op is 3.

 Vijay..


 On Mon, Jul 25, 2011 at 8:20 PM, swetha rahul swetharahu...@gmail.comwrote:

 int main()
 {
 int a[5]={1,2,3,4,5};
 int *ptr=a;
 printf(%d,*(ptr));
 getch();
 }

 Then why this prints 1.. ??


 On Mon, Jul 25, 2011 at 7:50 PM, sagar pareek sagarpar...@gmail.comwrote:

 here a is data type with 5*sizeof(int)
 so a+1 will give u next address just after the alloted whole array


 On Mon, Jul 25, 2011 at 7:44 PM, swetha rahul 
 swetharahu...@gmail.comwrote:

 Hi,

 int main()
 {
 int a[5]={1,2,3,4,5};
 int *ptr=a+1;
 printf(%d,*(ptr-1));
 }

 It prints 5... Can somebody explain wats happening here..?

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


-- 
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 DIRECT-I !!!!!!

2011-07-25 Thread swetha rahul
any info abt directi written exam questions or pattern?

On Mon, Jul 25, 2011 at 11:27 PM, Akash Mukherjee akash...@gmail.comwrote:

 directi updated

 On Mon, Jul 25, 2011 at 10:53 PM, shady sinv...@gmail.com wrote:
  @all
 
  Microsoft Questions
 
 https://docs.google.com/document/d/1exjvawzl5PRefTu5umJM5KpMBJs15PZVDMzYG_C2FEA/edit?hl=en_US
 
  Amazon Questions
 
 https://docs.google.com/document/d/1VIpiRycjZpzyEg1vhlm01NW5KeF6Y3RCE4Lq3dVvFGE/edit?hl=en_US
 
  Adobe_Directi Questions
 
 https://docs.google.com/document/d/1GhsStHu3WaCpbGd2PzpiyTvg_IY53dxLc6g6LzhlyKo/edit?hl=en_US
 
  Actually i was only giving an example. I will add the questions for
 Amazon
  and Microsoft for tomorrow. Others can also add questions as and when
 they
  feel like doing so.
 
  @aashish i know a couple of people in BIT MESRA, but i dont think fb
 could
  be merged with this google group... still will look into matter... thanks
 
 
 
  On Mon, Jul 25, 2011 at 10:35 PM, AASHISH SUMAN 
 aashish.barn...@gmail.com
  wrote:
 
  if u have any contact to the people of BIT MESRA plz ask dem or post in
  the group of bit mesra at fb..
  --
  WITH BEST REGARDS :
 
  AASHISH SUMAN
  MCA FINAL YEAR
  NIT DURGAPUR
  +91-9547969906
 
  --
  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.



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

2011-07-25 Thread swetha rahul
char *s=\12345s\n;
printf(\n %d,strlen(s));

The output is 5...?? But how.??

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

2011-07-25 Thread swetha rahul
*void main()
*{*
int i;
char *a=String;
char *p=New String;
char *Temp;
Temp=a;
a=malloc(strlen(p) + 1);
strcpy(a,p);
p = malloc(strlen(Temp) + 1);
strcpy(p,Temp);
printf((%s, %s),a,p);
free(p);
free(a);
} *
*
*
*
*
*output is (New String,String)*
*
*
*how does Temp retains String even after New String is copied in a? Is it
not pointing to the same location?pls explain*

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

2011-07-24 Thread swetha rahul
We have also Amazon coming up this week.. Please do post the questions if u
have any...!!

On Sun, Jul 24, 2011 at 8:19 PM, Agyat jalsa.n.sa...@gmail.com wrote:

 recently, MS visited our campus ..and i saw that same questions
 were repeated in ANNA univ. so it will be helpful to post question if
 some company visits your campusi've heard that amazon is
 visiting nit warangal on 28 , so guys from warangal please post
 questionsas it might be helpful for us...

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



[algogeeks] MS

2011-07-19 Thread swetha rahul
Hi,
Find the kth smallest element in O(logk) given 2 sorted arrays.
Merging the arrays is not allowed. I can do it in O(k).. How to do in
O(logk)..

-- 
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] MS

2011-07-19 Thread swetha rahul
Arrays are not of the same size

On Tue, Jul 19, 2011 at 10:41 PM, Rishabh Maurya poofiefoo...@gmail.comwrote:

 Its solvable using Binary Search , offcourse  not in log(k) but in log(sum
 of size of array).

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



Re: [algogeeks] MS question

2011-07-17 Thread swetha rahul
ya got it..thanks...

how abt test cases for program to check whether a given string is palindrome
or not..?

On Sun, Jul 17, 2011 at 8:35 PM, ankit sambyal ankitsamb...@gmail.comwrote:

 1. If u entered nothing and just pressed search, it should display nothing.
 2. If u just entered a space and just pressed search, it should display
 nothing.
 3.Verify the results are really related to give word or not
 4.Check if proper Result is displayed for key word.
 5. Check for the Order of the Result set, whether most relevant
 results are displayed first.

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



Re: [algogeeks] Re: MS question

2011-07-17 Thread swetha rahul
is this ans sufficient..? any other possible test cases for palindrome ?

On Sun, Jul 17, 2011 at 8:53 PM, Nishant mittal.nishan...@gmail.com wrote:

 1.If string is NULL then it should return 1 i.e. string is palindrome
 2.If there is only one character in string then it is palindrome
 3.If reverse of given string is same as string

 On Jul 17, 8:18 pm, swetha rahul swetharahu...@gmail.com wrote:
  ya got it..thanks...
 
  how abt test cases for program to check whether a given string is
 palindrome
  or not..?
 
  On Sun, Jul 17, 2011 at 8:35 PM, ankit sambyal ankitsamb...@gmail.com
 wrote:
 
   1. If u entered nothing and just pressed search, it should display
 nothing.
   2. If u just entered a space and just pressed search, it should display
   nothing.
   3.Verify the results are really related to give word or not
   4.Check if proper Result is displayed for key word.
   5. Check for the Order of the Result set, whether most relevant
   results are displayed first.
 
   --
   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.



Re: [algogeeks] Re: MS question

2011-07-17 Thread swetha rahul
Thanks everyone!!

On Sun, Jul 17, 2011 at 10:56 PM, ankit sambyal ankitsamb...@gmail.comwrote:

 Check for case senstivity also:
 eg:   Madam and madam both are palindromes.


 Also for clarify with the interviewer whether whitespace and
 punctuation can be ignored.
 eg: is the following string a palindrome or not:
 A man, a plan, a canal, Panama
 And check for this condition accordingly

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



[algogeeks] MS Ques

2011-07-17 Thread swetha rahul
Hi,
Given 2 linked lists L1 and L2 create a linked list that gives
the multiplication of the above 2 linked lists.
Eg: L1 =1-5
  L2 =1-0

Ans must be 1-5-0

-- 
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] what would be the output of following code??

2011-07-16 Thread swetha rahul
2

On Sat, Jul 16, 2011 at 2:51 PM, shiv narayan narayan.shiv...@gmail.comwrote:

 Printf(“%d”,printf(“%d %d”,2,2)  printf(“%d %d ”, 2, 2));

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



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

2011-07-16 Thread swetha rahul
@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.



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

2011-07-16 Thread swetha rahul
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.



[algogeeks] MS Question

2011-07-15 Thread swetha rahul
Hi,


 #includestdio.h
char *c[]={ENTNG,NST,AMAZI,FIRBE};
char **cp[]={c+3,c+2,c+1,c};
char ***cpp=cp;
void main()
{
printf(%s,**++cpp);
printf(%s,*--*++cpp+3);
printf(%s,*cpp[-2]+3);
printf(%s,cpp[-1][-1]+1);
}


The answer is AMAZING BEST ... Can somebody explain the last printf
alone.??

-- 
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] PeP

2011-07-10 Thread swetha rahul
Hi,
Has anyone attended PeP (Particiaptory exam for palcement).Can
 u give me some guidance..??

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

2011-07-10 Thread swetha rahul
Sry it is Participatory exam for placement.

On Mon, Jul 11, 2011 at 1:16 AM, swetha rahul swetharahu...@gmail.comwrote:

 Hi,
 Has anyone attended PeP (Particiaptory exam for palcement).Can
  u give me some guidance..??


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

2011-07-07 Thread swetha rahul
Got it...Thanks..

On Wed, Jul 6, 2011 at 11:31 PM, shiv narayan narayan.shiv...@gmail.comwrote:

 speed of river=(distance traveled by object in it) / total time it
 took to travel

 here hat has traveled a distance of 1 KM
 and it has taken =5mn+5 min=10 min=10min/60=1/6 hrs;
 so speed = 1/(1/6)=6km/hr

 On Jul 6, 9:28 pm, Tushar Bindal tushicom...@gmail.com wrote:
  Let speed of boat be x miles/hr
  Let speed of river be s miles/hr
 
  First Method:
  Hat comes down 1 mile in 10 minutes.
  Hat comes with flow of river only. So its speed is equal to speed of
 river.
  In 60 minutes, it will travel 6 miles.
  thus, s = 6 miles/hr
 
  Second Method:
  Distance travelled upward by boat = 1 + (5/60)*(x-s) miles
  Distance travelled downward by boat = (5/60)*(x+s) miles
  Both are same, so
  1 + (5/60)*(x-s) = (5/60)*(x+s)
  x gets cancelled, and we have
  s/6 = 1
  s = 6 miles/hr
 
  Second method is just one possible method which nobody would like to
 follow.
  First one is easier and faster - win-win situation
  For a change the easier method is faster as well
  --
  Tushar Bindal
  Computer Engineering
  Delhi College of Engineering
  Mob: +919818442705
  E-Mail : tushicom...@gmail.com
  Website:www.jugadengg.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.



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

2011-07-07 Thread swetha rahul
At a movie theater, the manager announces that they will give a free ticket
to the first person in line whose birthday is the same as someone who has
already bought a ticket. You have the option of getting in line at any time.
Assuming that you don't know anyone else's birthday, that birthdays are
distributed randomly throughout the year, etc., what position in line gives
you the greatest chance of being the first duplicate birthday?

can sumone help to find ans?

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

2011-07-06 Thread swetha rahul
Hi,
A son and father goes for boating in river upstream . After
rowing for 1 mile son notices the hat of his fathe falling in the
river.After 5 min. he tells his father that his hat has fallen. So they turn
round and are able to pick the hat at the point from where they began
boating after 5min. Tell the speed of river?  The answer is 6miles/hr. Can
anyone say how..??

-- 
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] MS Ques

2011-07-05 Thread swetha rahul
Hi,
  Write a function which takes two char * s as inputs, one is a
regular expression pattern and the other is a test string and check whether
the test string is of the given regular expression pattern.
The regular expression pattern can contain all lower-case letter, asterisk
and question mark.
As usual asterisk stands for 0 or more number of chars and ? for any one
char.
E.g. Regular Expression: a*b?c
Test String: aaavcxbmbcxmbkc
Result: TRUE
Test String: abc
Result: FALSE
Test String: abzx
Result: TRUE

What is d best way 2 do this...

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