Re: [algogeeks] Re: Longest palindrome

2011-08-22 Thread coder dumca
@ harry how it is possible man

On Mon, Aug 22, 2011 at 3:58 AM, WgpShashank wrote:

> Hey Geeks I think question can be solved by many ways . some of the
> algorithms are i have implemented & aware of are ->
>
> 1st. Algo
>  Generate all palindromes (even & odd length ) of given string while keep
> tracking of their length in last just compare max (evenlength_palindrome ,
> oddlength_palindrome) .
>  Time Complexity O(N^2) where N is length of String
>
> 2nd . Algo. For Those Who are just saying Use DP :)
>   Find The LCS(Longest Common Sub-sequence of String (say s1)& reverse of
> String (say s2) ) It Involves
>   DP to solve efficiently but guaranteed optimal solution
>   Time Complexity O(N^2) where N is length of String
>   Space  Complexity O(N^2)  for table
>
> 3rd. Use Suffix Tree ( Need to Work On It)  basic idea is to build the
> suffix tree of string & reverse string check no every node where suffix
> belongs to , the deepest common node will us longest palindrome in given
> string.
>
> Correct me if i missed something ?
>
> 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/-/56GQiQVlUukJ.
>
> 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] Important

2011-08-22 Thread coder dumca
hi manglu

On Mon, Aug 22, 2011 at 7:05 AM, Mangal Dass wrote:

> Anybody pls tell me the questions coming into Information-Mosaic campus
> test.
> Mosaic has changed its pattern.
> Pls post both the pattern as well as questions(if something u remembered) .
>
> Thanks a lot,
>
> --
> 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] constructor ques

2011-08-22 Thread coder dumca
@sukran ur r wrong man
the construdor of virtual base class are called first  otherwise it is from
left to right
so the correct order is
D A B C Z
On Mon, Aug 22, 2011 at 8:25 AM, Sanjay Rajpal  wrote:

>  agree with sukran.
>
>
> Sanju
> :)
>
>
>
> On Mon, Aug 22, 2011 at 8:20 AM, sukran dhawan wrote:
>
>> its left to right always !
>>
>>
>> On Mon, Aug 22, 2011 at 8:49 PM, Sanjay Rajpal  wrote:
>>
>>>  A
>>> B
>>> C
>>> D
>>>
>>>
>>> Sanju
>>> :)
>>>
>>>
>>>
>>> On Mon, Aug 22, 2011 at 8:17 AM, sivaviknesh s 
>>> wrote:
>>>
 you have 4 classes A,B,C,D and class Z is derived from all these classes

 using
 Class Z: public A,private B,Protected C, Virtual D
 What is the order of constructor call?

 ...plz reason out also

 --
 Regards,
 $iva

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

-- 
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: Microsoft written!!!

2011-08-10 Thread coder dumca
apply BFS
the node after the particular node(whode cousin to be find) will be the
required node

On Wed, Aug 10, 2011 at 2:15 PM, Puneet Chawla wrote:

>
> Agree with mohit goel..
>
> On Wed, Aug 10, 2011 at 11:22 AM, Mohit Goel wrote:
>
>>10
>>  4  5
>>2  7  6 11
>>1 39   8 12  13   14   15
>>
>>
>> i think we should first  find the parent of the particular node ..then
>> apply the concept as told by Brijesh on it 
>>
>> p =parent(q);
>> r = parent(p);
>> count =1;
>> while(p ==isright(r))
>> {
>> p=r;
>> r=parent(r);
>> count++;
>> if(r==root)
>> break;
>>
>> }
>>
>> if(d =right(r))
>> {
>> while(count!=0)
>> {
>> if(d->left)
>> d=d->left;
>> else d=d->right;
>> count--;
>> }
>> }
>> else return NULL;
>> o/p=d->value;
>>
>>
>>
>>  --
>> 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.
>>
>
>
>
> --
> With regards
>   
> Puneet Chawla
> Computer Engineering Student
> NIT Kurukshetra
>
>  --
> 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: Probability Puzzle

2011-08-08 Thread coder dumca
it's 3/5

On Tue, Aug 9, 2011 at 8:29 AM, Dave  wrote:

> @Dipankar: You are correct about the answer to your alternative
> question being 17/80, but your answer 3/5 says that you don't think
> you have learned anything by the five heads flips. Don has given a
> good explanation as to why the answer is 17/18, but you apparently
> refuse to accept it. There is none so blind as one who will not see.
>
> Dave
>
> On Aug 8, 9:26 pm, Dipankar Patro  wrote:
> > 3/5.
> >
> > As the question doesn't ask anything about the sequence.
> > Had the question been " Find the probability that all 6 are H " then it
> > would have been 17/80.
> >
> > On 9 August 2011 04:07, Dave  wrote:
> >
> >
> >
> >
> >
> > > @Vinay: What if you tossed 100 consecutive heads? Would that be enough
> > > to convince you that you had the double-headed coin? If so, then
> > > doesn't tossing 5 consecutive heads give you at least an inkling that
> > > you might have it? Wouldn't you then think that there would be a
> > > higher probability of getting a head on the sixth toss than there was
> > > on the first toss (3/5)? Don's conditional probability answer 17/18 is
> > > the right answer.
> >
> > > Dave
> >
> > > On Aug 8, 5:04 pm, vinay aggarwal  wrote:
> > > > answer should be 3/5
> > > > think like that tossing 5 times will not help you predict the outcome
> > > > of sixth toss. Therefore that information is meaningless.
> >
> > > --
> > > 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.



Re: [algogeeks] MICROSOFT INTERVIEW QUESTIONS faced by my frenz nd me

2011-08-07 Thread coder dumca
oh soory

On Sun, Aug 7, 2011 at 12:02 PM, Neha Sharan  wrote:

> @coder: it is not bst.
>
>
> On Mon, Aug 8, 2011 at 12:15 AM, coder dumca wrote:
>
>> inoeder traversal is given 1 2 3 4 5 6 7 8 9
>> in preorder traversal  root come fist , then left and then right.
>> see the option
>>a.1 6 3 2 7 8 4 9
>>
>> 1 is root at left there is 6 , sine  left child must be smaller than root
>>
>> in this way none of options are satisfying this
>>b.6 7 3 8 1 9 2 7   6  is roor but 7 is greater
>>c,2 4 6 8 1 3 5 7
>>d.1 3 5 7 2 4 6 8
>>
>> i think the is some fault in the question it should  post order to find
>>   On Sun, Aug 7, 2011 at 11:38 AM, ankit sambyal 
>> wrote:
>>
>>> @coder : Cud u plz explain the approach for question 9 ??
>>>
>>> --
>>> 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] MICROSOFT INTERVIEW QUESTIONS faced by my frenz nd me

2011-08-07 Thread coder dumca
inoeder traversal is given 1 2 3 4 5 6 7 8 9
in preorder traversal  root come fist , then left and then right.
see the option
  a.1 6 3 2 7 8 4 9

1 is root at left there is 6 , sine  left child must be smaller than root

in this way none of options are satisfying this
   b.6 7 3 8 1 9 2 7   6  is roor but 7 is greater
   c,2 4 6 8 1 3 5 7
   d.1 3 5 7 2 4 6 8

i think the is some fault in the question it should  post order to find
On Sun, Aug 7, 2011 at 11:38 AM, ankit sambyal wrote:

> @coder : Cud u plz explain the approach for question 9 ??
>
> --
> 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 INTERVIEW QUESTIONS faced by my frenz nd me

2011-08-07 Thread coder dumca
in qyes no 9  I think none of options are correct

On Sun, Aug 7, 2011 at 8:25 AM, ankit sambyal wrote:

> Can anybdy explain the following questions :
> (5)  Find the output
> int arr[2][3]={{1,2,3},{4,5,6}};
> int (*ptr)[3]=&a[0];
> printf("(%d,%d)",(*ptr)[1],(*ptr)[2]);
> ptr+=1;
> printf("(%d,%d)",(*ptr)[1],(*ptr)[2]);
>
>Will this program compile properly or will end in segmentation
> fault ??
>
>
>  (9) Given a inorder traversal eg 1 2 3 4 5 6 7 8 9 , Check which of
> the following preorder traversal will it return .
>a.1 6 3 2 7 8 4 9
>b.6 7 3 8 1 9 2 7
>c,2 4 6 8 1 3 5 7
>d.1 3 5 7 2 4 6 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.
>

-- 
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] max product!

2011-08-07 Thread coder dumca
1: choose 4 biggest numbers  with abs value
following situations will arise
1: all 4 numbers are +ve  then choose the biggest 3
2: 1 -ve3 +ve  choose 3 positive numbers
3: 3 -ve1 +ve   choose  2 -ve(with largest abs value)  and 1 +ve
4: 2 +ve   2 -ve choose accordingly
4 all are -ve  choose 2 -ve(with largest abs value)  and scna the arry to
finf largest +ve int

pls let me know if i m wrong

On Sun, Aug 7, 2011 at 6:09 AM, Nikhil Veliath  wrote:

> given an array that has n nos . . . . find the maximum product of 3
> nos and display the 3 nos . . .
>
> 25 9 6 8 -20 -5 -10
>
> so
> max product 5000
>
> the nos are -20 -10 25
>
> give an O(n) solution and if possible try avoid using sort
>
> --
> 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] finding triplets

2011-08-06 Thread coder dumca
given an array find all triplets such that a^2+b^2=c^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.



Re: [algogeeks] Paypal interview Questions

2011-08-06 Thread coder dumca
default  arguments are added right to left  , in first one it is left to
right thats why error

On Sat, Aug 6, 2011 at 9:41 AM, siddharth srivastava wrote:

> Hi
>
>  On 6 August 2011 12:08, swetha rahul  wrote:
>
>> Hi,
>>
>> Q.No:1
>>  what is wrong here
>> void foo(int x=10,int y)
>> how compiler will treat it??
>
>
> compiler error
> to get it working y should also have a default value.
>
>
>>
>> and what happen here
>> void foo(int x=10,int y=20)
>>
>>
> will work fine
>
>
>> 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.
>>
>
>
>
> --
> Regards
> Siddharth Srivastava
>
>
>
> --
> 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] size -------

2011-08-06 Thread coder dumca
on gcc it is 16 bytes  and  on dev cpp its  24  bytes

On Sat, Aug 6, 2011 at 11:10 AM, siddharth srivastava
wrote:

>
>
>  On 6 August 2011 23:27, Nitin  wrote:
>
>> I am also getting 24 bytes but y it is taking it every data type as 8,8,8
>> as if we take it alone it is 1 for char and 4 for int and 8 for doble as it
>> is giving 24 which means it is setting every data type as 8 bytes.
>>
>
> it should be due to 64 bit machine (and I guess an appropriate compiler
> suiting the architecture)
> btw, what's your system architecture and compiler specifications ?
>
>
>
>>
>>  On Sat, Aug 6, 2011 at 9:28 PM, Aditya Virmani > > wrote:
>>
>>> i guess it depends on ur system configuration...for 32 bit
>>> machines...respective sizes allocated would be 4,4,8 :giving 16
>>> & on 64 bit machines it wud be 8,8,8: giving 24. Correct me if i am
>>> wrong.
>>>
>>>
>>> On Sat, Aug 6, 2011 at 9:24 PM, SANDEEP CHUGH 
>>> wrote:
>>>
 @ sukran , nitish :
 guys, i dnt knw about the output from these online compliers..


 On Sat, Aug 6, 2011 at 9:20 PM, SANDEEP CHUGH 
 wrote:

>
> @payel : according to u,,starting address cannot be 4.. ok.
> but wat if i hav used the following structure before that structure
>
> struct demo1
> {
> char a;
> int b;
> char c;
>
> }
>
>
>  On Sat, Aug 6, 2011 at 9:06 PM, Nitish Garg  > wrote:
>
>> Why does Ideone https://ideone.com/1Uwxx gives 16?
>>
>> --
>> 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/-/L-zANxDDTUQJ.
>>
>> 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.
>>
>
>
>
> --
> Regards
> Siddharth Srivastava
>
>
>
> --
> 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: Microsoft :)

2011-08-06 Thread coder dumca
congrats man

On Sat, Aug 6, 2011 at 5:14 AM, parag khanna wrote:

> congrats dude ... can u plz tell me the questions asked ... microsoft is
> visiting our campus on 29th
>
> --
>  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] Query to find the Nth highest salary in employee table

2011-08-06 Thread coder dumca
select top 1 salary from(select top 6   salary from employee
order by salary desc)asc

On Sat, Aug 6, 2011 at 6:40 PM, Reynald  wrote:

> Could anyone please explain me how this query selects the employee
> with nth highest salary?
>
> select last_name, salary from employees e1
> where &n = (select count(distinct(salary)) from employees e2
> where e2.salary >= e1.salary);
>
> --
> 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] finding triplets

2011-08-06 Thread coder dumca
given an array , find three  numbers a,b and c such that a^2+b^2=c^2   in
o(n^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.



Re: [algogeeks] probabilty

2011-08-05 Thread coder dumca
i think it should  be 3/4

On Fri, Aug 5, 2011 at 4:20 PM, aditi garg wrote:

> 1/8
>
> On Fri, Aug 5, 2011 at 4:14 PM, coder dumca  wrote:
>
>>  A man speaks truth 3 out of 4 times. He throws a die and reports it to
>> be a 6.
>> What is the probability of it being a 6?
>>
>> 1 /2
>> 3 /4
>> 5 /8
>> 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.
>>
>
>
>
> --
> Aditi Garg
> Undergraduate Student
> Electronics & Communication Divison
> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
> Sector 3, Dwarka
> New Delhi
>
>
>  --
> 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] probabilty

2011-08-05 Thread coder dumca
A man speaks truth 3 out of 4 times. He throws a die and reports it to be a
6.
What is the probability of it being a 6?

1 /2
3 /4
5 /8
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.



Re: [algogeeks] Aricent is coming..

2011-08-03 Thread coder dumca
hi abhishek i dont have sample paper but i can ive u overview of aricent.
1 round written  : logical reasioning , aptitude and c /c++/java

2 round technical interview  go for the basics

On Wed, Aug 3, 2011 at 12:22 PM, abhishek kumar <
mailatabhishekgu...@gmail.com> wrote:

> hey guys..
> Aricent is visiting to our college on 22nd. will you provide me the pattern
> and sample papers..
> thanks in advance.
>
> --
> 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/-/aE5SSBY4lcwJ.
> 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] oracle question

2011-08-03 Thread coder dumca
system call causes a mode switch mode changes fron user to kernal.

On Wed, Aug 3, 2011 at 7:07 AM, naveen ms  wrote:

> @rajeev and sourabh:..thanks a lot;...:)
>
> --
>  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] Help for Thoughworks

2011-08-03 Thread coder dumca
hi reynald i have send u some questions  on the group

On Wed, Aug 3, 2011 at 10:36 AM, Reynald Suz wrote:

> Sorry for the typo, Its "Thoughtworks"
>
>
> On Wed, Aug 3, 2011 at 11:04 PM, Reynald  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.
>

-- 
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] latest google interview questions

2011-08-03 Thread coder dumca
abe tumhe to factory me data entry ki job bhi nahi milehi , bada aaya google
me interns lene wala.

On Tue, Aug 2, 2011 at 6:35 PM, tmdhat  wrote:

> dude
>
> keep threads clean.
> and please don't feed the trolls.
>
> it's obviously an entire bullshit from the beginning,,,
> why feed the trolls?
>
> --
> 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/-/PgVfey8EzMIJ.
>
> 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: virtual functions output

2011-08-02 Thread coder dumca
yes shiva
 this is one of the way to call base class constructor, we usually use this
style when we pass some values to base class constructor,  otherwise  base
class constrictor are always  imlicitly.

On Tue, Aug 2, 2011 at 1:35 AM, siva viknesh  wrote:

> how it ll simply call the  base class constructor ???
>
> As far as i know .
>
> if we give like.
>
> class abc
> {
>  abc(int i){.}
> }
> class def : public abc
> {
>
>   def(int i,int j):abc(i)
>
> {}
>
> // by using like this only u can call base class
> //constructor  no ???  ..correct me if i m wrong
>
>
> }
>
> On Aug 1, 11:04 pm, coder dumca  wrote:
> > base class constructor are called before derived class construtors.
> >
> > Base* pBase = new Derived();  statement creates a derived class
> > object hence calls derived class condstructor, which calls base call
> > constructor. base class constructor calls fun()  which prints  " Base
> > Function".
> >
> > pls correct me  if i m wrong
> > On Mon, Aug 1, 2011 at 9:37 AM, sivaviknesh s  >wrote:
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > >  #include
> > > #include
> >
> > > using namespace std;
> >
> > > class Base
> > > {
> > > public:
> > >   Base()
> > >   {
> > > fun(); //note: fun() is virtual
> > >   }
> > >   virtual void fun()
> > >   {
> > > cout<<"\nBase Function";
> > >   }
> > > };
> >
> > > class Derived: public Base
> > > {
> > > public:
> > >   Derived(){}
> > >   virtual void fun()
> > >   {
> > > cout<<"\nDerived Function";
> > >   }
> > > };
> >
> > > int main()
> > > {
> > >   Base* pBase = new Derived();
> > >   delete pBase;
> >
> > >   getchar();
> > >   return 0;
> > > }
> >
> > > Output:
> > > *Base Function*
> >
> > > See following excerpt from C++ standard<
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1905.pdf>for
> explanation.
> >
> > > *When a virtual function is called directly or indirectly from a
> > > constructor (including from the mem-initializer for a data member) or
> from a
> > > destructor, and the object to which the call applies is the object
> under
> > > construction or destruction, the function called is the one defined in
> the
> > > constructor or destructor’s own class or in one of its bases, but not a
> > > function overriding it in a class derived from the constructor or
> > > destructor’s class, or overriding it in one of the other base classes
> of the
> > > most derived object.*
> >
> > > Because of this difference in behavior, it is recommended that object’s
> > > virtual function is not invoked while it is being constructed or
> destroyed.
> > > See this
> > > <
> https://www.securecoding.cert.org/confluence/display/cplusplus/OOP30-..
> .>for
>  > > more details.
> > > ..CAN ANYONE GIVE A SIMPLE EXPLANANTION?? given explanation
> is
> > > quite confusing
> >
> > > --
> > > Regards,
> > > $iva
> >
> > > --
> > > 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] about thoughtworks

2011-08-02 Thread coder dumca
hi algogeeks
 can anybody tell mw  the interview process of thoughtworks, the
kind of question in written and about the company.

-- 
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] HOW GARBAGE COLLECTOR WORKS IN JAVA

2011-08-01 Thread coder dumca
@ vaibhav   when we  are sure that we  dont need a particular object we can
call gc

On Mon, Aug 1, 2011 at 1:46 AM, Deepthi Srinivasan wrote:

> Garbage collector'll never run according to our whims and fancies :P It'll
> run only when it wants (mostly when it senses that memory is going down). We
> can issue a request using system.gc but we cannot MAKE it run...
>
>
> On Sun, Jul 31, 2011 at 11:56 PM, vaibhav shukla 
> wrote:
>
>> @mr coder : y do we need to call garbage collector explicitly when it
>> works automatically ?
>>
>>
>> On Sun, Jul 31, 2011 at 11:07 PM, coder dumca wrote:
>>
>>> generally jvm runs on following occasions
>>>
>>> 1: periodicaliy
>>> 2: when program is about to run out of memory the  JVM runs  and
>>> finallize the objects.
>>> 3: when we call using System.gc  or Runtime.getruntime.gc
>>>
>>> pls correct me if i m wrong
>>>
>>> On Sat, Jul 30, 2011 at 11:10 AM, vaibhav shukla <
>>> vaibhav200...@gmail.com> wrote:
>>>
>>>> please give a glimps of how garbage collection is done in java.
>>>> how *System.gc()*  works ?
>>>>
>>>> --
>>>>   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.
>>>
>>
>>
>>
>> --
>>   best wishes!!
>> Vaibhav
>>   MCA
>>
>>
>>  --
>> 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,
> Deepthi
>
>  --
> 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] need help

2011-08-01 Thread coder dumca
hi frnds
can any body tell me how a student can appear for amazon or microsoft , if
these comanies are not coming to the campus.

-- 
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] Max subarray of no 2 adjacent elements

2011-08-01 Thread coder dumca
i think the answer should be 15

On Mon, Aug 1, 2011 at 12:46 PM, Abhishek Gupta wrote:

> let the array be A={ 3,5,7,10} then it should give output as 13 (3+10)
>
> In short, we need to find the possible maximum sum such that no 2 elements
> in the subarray has 2 elements adjacent. there is no bound on the size of
> subarray.
> --
> Abhishek Gupta
> MCA
> NIT Calicut
> Kerela
>
>  --
> 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] virtual functions output

2011-08-01 Thread coder dumca
base class constructor are called before derived class construtors.

Base* pBase = new Derived();  statement creates a derived class
object hence calls derived class condstructor, which calls base call
constructor. base class constructor calls fun()  which prints  " Base
Function".


pls correct me  if i m wrong
On Mon, Aug 1, 2011 at 9:37 AM, sivaviknesh s wrote:

>
>  #include
> #include
>
> using namespace std;
>
> class Base
> {
> public:
>   Base()
>   {
> fun(); //note: fun() is virtual
>   }
>   virtual void fun()
>   {
> cout<<"\nBase Function";
>   }
> };
>
> class Derived: public Base
> {
> public:
>   Derived(){}
>   virtual void fun()
>   {
> cout<<"\nDerived Function";
>   }
> };
>
> int main()
> {
>   Base* pBase = new Derived();
>   delete pBase;
>
>   getchar();
>   return 0;
> }
>
> Output:
> *Base Function*
>
> See following excerpt from C++ 
> standardfor
>  explanation.
>
> *When a virtual function is called directly or indirectly from a
> constructor (including from the mem-initializer for a data member) or from a
> destructor, and the object to which the call applies is the object under
> construction or destruction, the function called is the one defined in the
> constructor or destructor’s own class or in one of its bases, but not a
> function overriding it in a class derived from the constructor or
> destructor’s class, or overriding it in one of the other base classes of the
> most derived object.*
>
> Because of this difference in behavior, it is recommended that object’s
> virtual function is not invoked while it is being constructed or destroyed.
> See this
> for
> more details.
> ..CAN ANYONE GIVE A SIMPLE EXPLANANTION?? given explanation is
> quite confusing
>
> --
> Regards,
> $iva
>
> --
> 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] How to write the algorithm for longest increasing subsequence problem with complexity O(n logn)

2011-08-01 Thread coder dumca
it can be done in O(n)

On Mon, Aug 1, 2011 at 5:37 AM, kumar raja  wrote:

> I have seen the code in algorithmist ,but i am not getting it.
>
> @Piyush
>
> how will u solve it using 2-4 tree
>
> On 31 July 2011 23:39, Piyush Gaurav  wrote:
>
>> u need a 2,4 tree for dat
>>
>>
>> On 1 August 2011 11:59, Amol Sharma  wrote:
>>
>>> can be done with some modification on dp solution of O(n^2).
>>>
>>> i am comfortable with the O(n^2) solution. but i am also having
>>> difficulty in O(nlogn) solution
>>>
>>> check this link
>>> http://www.algorithmist.com/index.php/Longest_Increasing_Subsequence
>>>
>>>
>>> --
>>>
>>>
>>> Amol Sharma
>>> Third Year Student
>>> Computer Science and Engineering
>>> MNNIT Allahabad
>>>
>>>
>>>
>>>
>>> On Mon, Aug 1, 2011 at 11:49 AM, kumar raja wrote:
>>>


 --
 Regards
 Kumar Raja
 M.Tech(SIT)
 IIT Kharagpur,
 10it60...@iitkgp.ac.in
 7797137043.
 09491690115.

 --
 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.
>>>
>>
>>
>>
>> --
>> 3rd Year student
>> Dept. of Computer Science and Engineering
>> IIT Kharagpur.
>>
>> --
>> 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
> Kumar Raja
> M.Tech(SIT)
> IIT Kharagpur,
> 10it60...@iitkgp.ac.in
> 7797137043.
> 09491690115.
>
> --
> 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] Max subarray of no 2 adjacent elements

2011-08-01 Thread coder dumca
this is the correct working code

#define size   8
void main()
{

int a[]={16,2,4,10,1,12,5,6};
int sum=0,i,index;

for(i=0;ia[i+1])
{
 sum=sum+a[i];
  index=i;
   i=i+2;
}
   else
   {
  sum=sum+a[i+1];
  index=i;
   i=i+3;
   }

}

if(i-index>1)
sum=sum+a[i];

printf("maximum sum is   %d",sum);
}




On Mon, Aug 1, 2011 at 1:39 PM, Abhishek Gupta wrote:

> @Kartik
>
> we cant choose adjacent elements. for ex A={5,2,1,7,9,11} then we will have
> 5+7+11
> can any one give any algo for this
> thank you
>
>
> On Mon, Aug 1, 2011 at 1:25 PM, kartik sachan wrote:
>
>> oh..got it i didn't read that statement:(
>>
>>  --
>> 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.
>>
>
>
>
> --
> Abhishek Gupta
> MCA
> NIT Calicut
> Kerela
>
>  --
> 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] HOW GARBAGE COLLECTOR WORKS IN JAVA

2011-07-31 Thread coder dumca
generally jvm runs on following occasions

1: periodicaliy
2: when program is about to run out of memory the  JVM runs  and finallize
the objects.
3: when we call using System.gc  or Runtime.getruntime.gc

pls correct me if i m wrong

On Sat, Jul 30, 2011 at 11:10 AM, vaibhav shukla wrote:

> please give a glimps of how garbage collection is done in java.
> how *System.gc()*  works ?
>
> --
>   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.



Re: [algogeeks] Re: Interview ques

2011-07-31 Thread coder dumca
@ muthuraj
see here display in derived is overriding display() in base  and also has
purpose
class A
{
int a;
   public :
void dispaly()
{
  cout< wrote:

> Function overriding gains significance only when functions are declared
> virtual. Otherwise Overriding does not serve any purpose. the main idea
> behind virtual functions and method overloading is to implement Dynamic
> Polymorphism i.e decide which version of function(base or derived)  to be
> invoked during runtime.
>
> *Muthuraj R
> IV th Year , ISE
> PESIT , Bangalore*
>
>
>
>   On Sun, Jul 31, 2011 at 10:22 AM, Sandeep Jain wrote:
>
>> @Pandharinath: Please consider the following e.g.
>> class A
>> {
>> public:
>> void func(){ /* A'simplementation */}
>>  };
>>
>> class B:public A
>> {
>> public:
>> void func(){/* B's implementation*/ }
>> };
>>
>> What is B's func() doing?
>>
>>
>>
>>
>> Regards,
>> Sandeep Jain
>>
>>
>>
>>
>> On Sun, Jul 31, 2011 at 10:36 PM, pandharinath gorde <
>> pandharinath.go...@gmail.com> wrote:
>>
>>>
>>> sandeep ur misguiding all things are,.
>>>
>>> for overriding virtual keyword is used that means virtual functions only
>>> overriden.
>>> In c++ u require to add virtual keyword.
>>> and in java every non static function is by default virtual.
>>>
>>>
>>>
>>> On Sun, Jul 31, 2011 at 10:23 PM, Sandeep Jain wrote:
>>>
 Overridden functions and virtual functions are two different concepts...

 1) Two functions in the same scope having same but different signatures
 = Over Loading
 2) Two functions having same signatures but one defined in parent class
 and the other defined in child class == Overriding
 3) Virtual functions, allow for run time polymorphism among overridden
 functions.(only when invoked using pointer)

 btw I'm still trying to think if preventing function over-riding is
 possible...


 Regards,
 Sandeep Jain




 On Sun, Jul 31, 2011 at 10:13 PM, Ankit Minglani <
 ankit.mingl...@gmail.com> wrote:

> @aditi : in C++ you define a function virtual to let the derived class
> give its own definition for the same. and in that case the functions are
> overridden. unlike in JAVA where no virtual keyword is needed .. so if you
> write the same code as above in java .. that may be referred to as Method
> overriding .. but not in cpp.
>
>
> On Sun, Jul 31, 2011 at 9:34 AM, aditi garg  > wrote:
>
>> @ Ankit: Wat is overriding actually thn?
>>
>>
>> On Sun, Jul 31, 2011 at 9:58 PM, Anika Jain 
>> wrote:
>>
>>> ohkk.. m so sorry
>>>
>>>
>>> On Sun, Jul 31, 2011 at 9:41 PM, Ankit Minglani <
>>> ankit.mingl...@gmail.com> wrote:
>>>
 @anika: This is not function overriding i think .. you cannot call
 the f() function of the base class from the derived class object .. 
 what you
 are doing is creating a object of the derived class and calling the 
 version
 of f() that belong to derived class B .. ie is the same class object is
 calling the same class function .

 correct me if i m wrong .


 On Sun, Jul 31, 2011 at 8:42 AM, Anika Jain >>> > wrote:

> @ muthu : not declaring tht function as virtual wont save
> overriding
>
> class A
> {
> int a;
>
> public:
> void f()
> {}
> int f2(){}
> };
>
> class B:public A
> {
> public:
> void f()
> {
> cout<<"abc\n";
> }
> };
>
> int main()
> {
> B ob;
> ob.f();
> return 0;
> }
>
> in this output is abc..
> so overriding occured
>
>
> On Sun, Jul 31, 2011 at 8:41 PM, muthu raj 
> wrote:
>
>> Using friend functions we can only invoke already defined private
>> functions. We cannot override or prevent overriding using friend 
>> functions.
>> The problem here is how to prevent base class function from being 
>> overridden
>> in derived class.
>>
>> *Muthuraj R
>> IV th Year , ISE
>> PESIT , Bangalore*
>>
>>
>>
>>   On Sun, Jul 31, 2011 at 8:04 AM, Anika Jain <
>> anika.jai...@gmail.com> wrote:
>>
>>> what if we write that function as private of base class.. and
>>> make a function in derived class that is friend function of the 
>>> base class
>>> do that it can call tht private function of base.??
>>>
>>>
>>> On Sun, Jul 31, 2011 at 8:25 PM, muthu raj >> > wrote:
>>>
 Yeah but there is no equivalent of final keyword in c++.So
 to prevent member fun

Re: [algogeeks] Re: Interview ques

2011-07-31 Thread coder dumca
yes Sandeep(sir)  is perfectly right , if we definig a base class function
in derived with exactly same function signature  , the function in derived
class said to override the function in base class,   does nt matter whether
it is virtual or not.

On Sun, Jul 31, 2011 at 10:22 AM, Sandeep Jain wrote:

> @Pandharinath: Please consider the following e.g.
> class A
> {
> public:
> void func(){ /* A'simplementation */}
>  };
>
> class B:public A
> {
> public:
> void func(){/* B's implementation*/ }
> };
>
> What is B's func() doing?
>
>
>
>
> Regards,
> Sandeep Jain
>
>
>
>
> On Sun, Jul 31, 2011 at 10:36 PM, pandharinath gorde <
> pandharinath.go...@gmail.com> wrote:
>
>>
>> sandeep ur misguiding all things are,.
>>
>> for overriding virtual keyword is used that means virtual functions only
>> overriden.
>> In c++ u require to add virtual keyword.
>> and in java every non static function is by default virtual.
>>
>>
>>
>> On Sun, Jul 31, 2011 at 10:23 PM, Sandeep Jain wrote:
>>
>>> Overridden functions and virtual functions are two different concepts...
>>> 1) Two functions in the same scope having same but different signatures =
>>> Over Loading
>>> 2) Two functions having same signatures but one defined in parent class
>>> and the other defined in child class == Overriding
>>> 3) Virtual functions, allow for run time polymorphism among overridden
>>> functions.(only when invoked using pointer)
>>>
>>> btw I'm still trying to think if preventing function over-riding is
>>> possible...
>>>
>>>
>>> Regards,
>>> Sandeep Jain
>>>
>>>
>>>
>>>
>>> On Sun, Jul 31, 2011 at 10:13 PM, Ankit Minglani <
>>> ankit.mingl...@gmail.com> wrote:
>>>
 @aditi : in C++ you define a function virtual to let the derived class
 give its own definition for the same. and in that case the functions are
 overridden. unlike in JAVA where no virtual keyword is needed .. so if you
 write the same code as above in java .. that may be referred to as Method
 overriding .. but not in cpp.


 On Sun, Jul 31, 2011 at 9:34 AM, aditi garg 
 wrote:

> @ Ankit: Wat is overriding actually thn?
>
>
> On Sun, Jul 31, 2011 at 9:58 PM, Anika Jain wrote:
>
>> ohkk.. m so sorry
>>
>>
>> On Sun, Jul 31, 2011 at 9:41 PM, Ankit Minglani <
>> ankit.mingl...@gmail.com> wrote:
>>
>>> @anika: This is not function overriding i think .. you cannot call
>>> the f() function of the base class from the derived class object .. 
>>> what you
>>> are doing is creating a object of the derived class and calling the 
>>> version
>>> of f() that belong to derived class B .. ie is the same class object is
>>> calling the same class function .
>>>
>>> correct me if i m wrong .
>>>
>>>
>>> On Sun, Jul 31, 2011 at 8:42 AM, Anika Jain 
>>> wrote:
>>>
 @ muthu : not declaring tht function as virtual wont save overriding

 class A
 {
 int a;

 public:
 void f()
 {}
 int f2(){}
 };

 class B:public A
 {
 public:
 void f()
 {
 cout<<"abc\n";
 }
 };

 int main()
 {
 B ob;
 ob.f();
 return 0;
 }

 in this output is abc..
 so overriding occured


 On Sun, Jul 31, 2011 at 8:41 PM, muthu raj wrote:

> Using friend functions we can only invoke already defined private
> functions. We cannot override or prevent overriding using friend 
> functions.
> The problem here is how to prevent base class function from being 
> overridden
> in derived class.
>
> *Muthuraj R
> IV th Year , ISE
> PESIT , Bangalore*
>
>
>
>   On Sun, Jul 31, 2011 at 8:04 AM, Anika Jain <
> anika.jai...@gmail.com> wrote:
>
>> what if we write that function as private of base class.. and make
>> a function in derived class that is friend function of the base 
>> class do
>> that it can call tht private function of base.??
>>
>>
>> On Sun, Jul 31, 2011 at 8:25 PM, muthu raj 
>> wrote:
>>
>>> Yeah but there is no equivalent of final keyword in c++.So to
>>> prevent member function from overriding in derived class in c++ 
>>> dont declare
>>> the member function as virtual. Then it cannot be overridden in 
>>> derived
>>> class. There is no other way of preventing a member function of 
>>> base class
>>> from being overridden.
>>>
>>> *Muthuraj R
>>> IV th Year , ISE
>>> PESIT , Bangalore*
>>>
>>>
>>>
>>>   On Sun, Jul 31, 2011 at 7:38 AM, hima

Re: [algogeeks] need the book google resume and algorithms for interviews

2011-07-26 Thread coder dumca
@ Raghvendra  thanks dude

On Mon, Jul 25, 2011 at 7:20 PM, raghavendhra rahul <
rahulraghavend...@gmail.com> wrote:

>
> hi ,
>
> i think this s the link for algorithm for interviews ebook
>
>
> http://code.google.com/p/interview/downloads/detail?name=Algorithms%2Bfor%2BInterviews%2B%28scan%2Bocr%29.pdf
>
> --
> 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] need the book google resume and algorithms for interviews

2011-07-25 Thread coder dumca
hi frnds
if some body have  these  books  in  pdf  or  can share the link of  "the
google resume" and  "algorithms for interviews".

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] searching a number in circular sorted array

2011-06-10 Thread coder dumca
hi frndz

given an array which is circularly sorted  like

6  ,7,8   ,1   ,2   ,3  ,4,5
 search a  given number.

-- 
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] FOR ALL INDIANS PLZ READ IT

2011-06-10 Thread coder dumca
so what ? supporting anna hazare is not a bad idea.

On Thu, Jun 9, 2011 at 12:54 PM, Naveen Kumar wrote:

> There is no such condition put up by the govt.
> If you give a missed call you are showing your support to Anna Hazare
> Please read
> http://theindiapost.com/delhi/support-hazare-give-call-02261550789/
>
>
> On Thu, Jun 9, 2011 at 12:15 PM, Abdul Rahman Shariff 
> wrote:
>
>> did u try it ??
>> nd did u get the msg??
>>
>> On Thu, Jun 9, 2011 at 1:06 AM, kartik sachan wrote:
>>
>>> Frnz govt of india has put a condition dat lokpal bill will b implemented
>>> if 25 crore ppl spport it. plz give a miss kol(free) to 02261550789 .kol
>>> ends itself n u ll get a msg rply. Plz support against corruption...
>>>
>>> --
>>>
>>> *WITH REGARDS,*
>>> *
>>> *
>>> *KARTIK SACHAN*
>>>
>>> *B.TECH 2ND YEAR*
>>> *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.
>>>
>>
>>
>>
>> --
>>
>> Ehab Abdul Rahman Shariff
>>
>> --
>> 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
> Naveen Kumar
>
>  --
> 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] Re: please help me

2011-06-09 Thread coder dumca
I need some more books specialy on algo ds and puzzles

On Wed, Jun 8, 2011 at 4:07 AM, coder dumca  wrote:

> I am last year  student preparing for placements
>
> can any one give some ebooks on data structure,  algo etc.  like beofre
> some time , some one posted a book " how to crack the coding interview"
> that was an awesome book thanks to the guy who send the book . if anyone has
> some good ebooks  or links  loke these then please  post.
> 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.



Re: [algogeeks] FOR ALL INDIANS PLZ READ IT

2011-06-09 Thread coder dumca
wow it's working ...

On Wed, Jun 8, 2011 at 11:49 PM, sunny agrawal wrote:

> yup,  it works, i tried it!!
>
>
> On Thu, Jun 9, 2011 at 12:15 PM, Abdul Rahman Shariff 
> wrote:
>
>> did u try it ??
>> nd did u get the msg??
>>
>> On Thu, Jun 9, 2011 at 1:06 AM, kartik sachan wrote:
>>
>>> Frnz govt of india has put a condition dat lokpal bill will b implemented
>>> if 25 crore ppl spport it. plz give a miss kol(free) to 02261550789 .kol
>>> ends itself n u ll get a msg rply. Plz support against corruption...
>>>
>>> --
>>>
>>> *WITH REGARDS,*
>>> *
>>> *
>>> *KARTIK SACHAN*
>>>
>>> *B.TECH 2ND YEAR*
>>> *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.
>>>
>>
>>
>>
>> --
>>
>> Ehab Abdul Rahman Shariff
>>
>> --
>> 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.
>>
>
>
>
> --
> Sunny Aggrawal
> B-Tech IV year,CSI
> Indian Institute Of Technology,Roorkee
>
>
>  --
> 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: Samsung Bangalore is hiring a lot!!!!

2011-06-08 Thread coder dumca
to sayan nayak   last year MCA students can apply  please reply( with some
idea abt compensation)

On Tue, Jun 7, 2011 at 11:39 PM, ross  wrote:

> @sayan: thanks for the info :) Any idea on the compensation dude?
>
> On Jun 7, 10:53 pm, sayan nayak  wrote:
> > :D.Sure.Afterall  Destiny is not a matter of chances,it all abt ur
> choices
> > :)
> >
> > On Tue, Jun 7, 2011 at 11:20 PM, sunny agrawal  >wrote:
> >
> >
> >
> >
> >
> >
> >
> > > uninterested can filter messeges from sayanna...@gmail.com. :P
> >
> > > On Tue, Jun 7, 2011 at 11:14 PM, sayan nayak 
> wrote:
> >
> > >> Multiple openings in Samsung Bangalore in following domains:
> > >>  1. Wireless protocols
> > >>  2. Android
> > >>  3. Multimedia
> > >>  4. Browser
> > >>  5. mobile application.
> > >>  6.Embedded System.
> > >> interested people can send their resume to sayanna...@gmail.com.
> >
> > >> Regards,
> > >> Sayan
> >
> > >> --
> > >> 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.
> >
> > > --
> > > Sunny Aggrawal
> > > B-Tech IV year,CSI
> > > Indian Institute Of Technology,Roorkee
> >
> > >  --
> > > 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: Min Enqueue Dequeue in O(1)

2011-06-08 Thread coder dumca
I have same problem  to implement a to implement a stack with functions
push(int)  pop   min()  and max()  in O(1)
if some one know please elaborate.

On Tue, Jun 7, 2011 at 11:13 PM, ross  wrote:

> Can u pls elaborate on your approach further?
>
> On Jun 7, 10:17 pm, NIKHIL JAIN 
> wrote:
> > it with the change that now it is min
> >
> > On Tue, Jun 7, 2011 at 10:47 PM, NIKHIL JAIN <
> nikhil.jain.shali...@gmail.com
> >
> >
> >
> >
> >
> >
> >
> > > wrote:
> > > i think sliding window is based on
> >
> > > On Tue, Jun 7, 2011 at 9:26 PM, ross  wrote:
> >
> > >> Design a Queue (strictly fifo) to support findmin, enqueue, dequeue in
> > >> o(1).
> > >> extra space allowed.
> > >> (for a stack, its trivial with 2 stacks) Can the same approach be
> > >> applied for a queue?
> >
> > >> --
> > >> 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] [brain teaser] Salman age puzzle 7 june

2011-06-08 Thread coder dumca
84 years  really good .

On Tue, Jun 7, 2011 at 1:49 PM, Terence  wrote:

>  84 years.
> The well known Diophantus Riddle:
> http://en.wikipedia.org/wiki/Diophantus#Biography
>
>
> On 2011-6-7 16:03, Lavesh Rawat wrote:
>
>*Salman age puzzle
> * * *
> *
> *
> **
> *salman's youth lasted one sixth of his life. He grew a beard after one
> twelfth more. After one seventh more of his life, he married. 5 years later,
> he and his wife had a son. The son lived exactly one half as long as his
> father, and salman died four years after his son.
>
> How many years did salman live?
> *
> *Update Your Answers at* : Click 
> Here
>
>  Solution:
>
>  Will be updated after 1 day
>
>
>
> --
>
> "Never explain yourself. Your friends don’t need it and
> your enemies won’t believe it" .
> --
> 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] c problem

2011-06-08 Thread coder dumca
@harshalthanks  , can u tell me how to find what features are compiler
dependent

On Wed, Jun 8, 2011 at 4:28 PM, Harshal  wrote:

> This depends upon the implementation. Hence, your program is not
> portable. It's allowed to return NULL, and it's allowed to return a non-NULL
> pointer. Both ways are sanctioned by the Standard.
>
> On Wed, Jun 8, 2011 at 4:20 PM, coder dumca  wrote:
>
>> can any one tell me why this code perfectly running and giving ouput 56
>>
>> int main()
>> {
>> int *p=malloc(0);
>> *p=56;
>> printf("%d",*p);
>> return 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.
>>
>
>
>
> --
> Harshal Choudhary,
> III Year B.Tech CSE,
> NIT Surathkal, Karnataka, 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.
>

-- 
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] please help me

2011-06-08 Thread coder dumca
I am last year  student preparing for placements

can any one give some ebooks on data structure,  algo etc.  like beofre some
time , some one posted a book " how to crack the coding interview"  that was
an awesome book thanks to the guy who send the book . if anyone has some
good ebooks  or links  loke these then please  post.
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.



[algogeeks] c problem

2011-06-08 Thread coder dumca
can any one tell me why this code perfectly running and giving ouput 56

int main()
{
int *p=malloc(0);
*p=56;
printf("%d",*p);
return 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] [brain teaser ] Find The Next Number 6 june

2011-06-06 Thread coder dumca
thanks arpit :)


On Tue, Jun 7, 2011 at 12:43 AM, Arpit Sood  wrote:

> (3 5) (5 7) (11 13) (17 19)
> so in short if you do a +1, -1 to these pairs you will get one number
> 4, 6, 12, 18.. and it goes like this
>
>
> On Tue, Jun 7, 2011 at 12:04 AM, coder dumca wrote:
>
>> I still didn't got arpit can u explain pls.
>>
>>
>> On Mon, Jun 6, 2011 at 7:15 AM, shashankreddy509 <
>> shashankreddy...@gmail.com> wrote:
>>
>>> thanks Arpit
>>> --
>>> 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/-/VXJkN2RnOTBnOU1K.
>>>
>>> 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,
> Arpit Sood
>  --
> 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] [brain teaser ] Find The Next Number 6 june

2011-06-06 Thread coder dumca
I still didn't got arpit can u explain pls.

On Mon, Jun 6, 2011 at 7:15 AM, shashankreddy509  wrote:

> thanks Arpit
>
> --
> 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/-/VXJkN2RnOTBnOU1K.
>
> 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.