Re: [algogeeks] Puzzle

2011-08-18 Thread Prem Krishna Chettri
Only N is Married.. as if L is not married that n Must be married .. Again
for M to marry N must not Marry. but as N is Married.. so.. M cannot
marry...



On Fri, Aug 19, 2011 at 9:24 AM, Dheeraj Sharma  wrote:

> M and N are married
>
>
> On Fri, Aug 19, 2011 at 5:19 AM, Abhishek Sharma 
> wrote:
>
>> M (hint: replace ü and û with their actual meaning.. u 'll understand)
>>
>>
>> On Fri, Aug 19, 2011 at 4:10 AM, payal gupta  wrote:
>>
>>> was there anything more specified
>>> Regards,
>>> PAYAL GUPTA
>>>
>>>
>>> On Fri, Aug 19, 2011 at 3:29 AM, Aditya Virmani <
>>> virmanisadi...@gmail.com> wrote:
>>>
 If ü - Married
 û - Not Married and
 M-ü N-û
 N-ü L-û
 L-û M-ü
 Who is married?

 qn was put up in this way, asked in Deloitte 2004.

 --
 You received this message because you are subscribed to 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.
>>
>
>
>
> --
> *Dheeraj Sharma*
> Comp Engg.
> NIT Kurukshetra
> +91 8950264227
>
>
>  --
> You received this message because you are subscribed to 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] Adobe off campus event

2011-08-18 Thread payel roy
@Rahul, Can you please share the link where you have seen that microsoft is
recruiting through offcampus?

On 19 August 2011 01:24, payal gupta  wrote:

> +1 siddharam
> plzz...inform any off campus...if any1 has any idea..
>
> Regards,
> PAYAL GUPTA.
>
>
> On Thu, Aug 18, 2011 at 11:27 PM, siddharam suresh <
> siddharam@gmail.com> wrote:
>
>> guys please keep updating about any off campus event
>> Thank you,
>> Siddharam
>>
>>
>>
>> On Thu, Aug 18, 2011 at 10:28 PM, rubal singh wrote:
>>
>>> Is Adobe open now for offcampus recruitment??
>>>
>>> Regards
>>> Rubal Singh
>>>
>>> On Thu, Aug 18, 2011 at 5:11 PM, anon  wrote:
>>> > Has anyone recently appeared for Adobe off campus event?  The profile
>>> > is C/C++ programming as MTS. It is for 1 yr experienced or more
>>> > candidates.
>>> > Any pointers for its preparation are welcome :)
>>> >
>>> > --
>>> > You received this message because you are subscribed to 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] how to find median of two sorted arrays

2011-08-18 Thread Ashima .
@Arjoo kumar value of loops will vary acc to sum is odd or even
loops = sum/2 (sum even)
=(sum/2) + 1 (sum odd)
Ashima
M.Sc.(Tech)Information Systems
4th year
BITS Pilani
Rajasthan




On Fri, Aug 19, 2011 at 11:10 AM, Sanjay Rajpal wrote:

> Plz make one point clear can we use extra space or not ?
>
> because complexity will vary depending upon the approach.
>
> *Regards
>
> Sanju
>
> Happy to Help :)*
>
>
>
>
> On Fri, Aug 19, 2011 at 11:04 AM, arjoo kumar <2009ar...@gmail.com> wrote:
>
>> find
>> 1length1 (arr1)
>> 2length 2(arr2)
>> 3sum = length1 +length 2
>> 4loops = sum /2
>> 5... set two pointer (say ptr1 & ptr2) on arr[0]& arr2[0]
>> 6 start loop for i =1 to loops
>>   if (*ptr1 <= *ptr2 )
>>ptr1++
>>   else
>>ptr2++
>>
>> please manage it & remaining part send after some time
>>
>>  --
>> You received this message because you are subscribed to 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] how to find median of two sorted arrays

2011-08-18 Thread Raghavan
It  would be better to avoid extra space.

On Fri, Aug 19, 2011 at 11:10 AM, Sanjay Rajpal wrote:

> Plz make one point clear can we use extra space or not ?
>
> because complexity will vary depending upon the approach.
>
> *Regards
>
> Sanju
>
> Happy to Help :)*
>
>
>
>
> On Fri, Aug 19, 2011 at 11:04 AM, arjoo kumar <2009ar...@gmail.com> wrote:
>
>> find
>> 1length1 (arr1)
>> 2length 2(arr2)
>> 3sum = length1 +length 2
>> 4loops = sum /2
>> 5... set two pointer (say ptr1 & ptr2) on arr[0]& arr2[0]
>> 6 start loop for i =1 to loops
>>   if (*ptr1 <= *ptr2 )
>>ptr1++
>>   else
>>ptr2++
>>
>> please manage it & remaining part send after some time
>>
>>  --
>> You received this message because you are subscribed to 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.
>



-- 
Thanks and Regards,
Raghavan KL

-- 
You received this message because you are subscribed to 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 find median of two sorted arrays

2011-08-18 Thread Sanjay Rajpal
Plz make one point clear can we use extra space or not ?

because complexity will vary depending upon the approach.

*Regards

Sanju

Happy to Help :)*



On Fri, Aug 19, 2011 at 11:04 AM, arjoo kumar <2009ar...@gmail.com> wrote:

> find
> 1length1 (arr1)
> 2length 2(arr2)
> 3sum = length1 +length 2
> 4loops = sum /2
> 5... set two pointer (say ptr1 & ptr2) on arr[0]& arr2[0]
> 6 start loop for i =1 to loops
>   if (*ptr1 <= *ptr2 )
>ptr1++
>   else
>ptr2++
>
> please manage it & remaining part send after some time
>
>  --
> You received this message because you are subscribed to 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 find median of two sorted arrays

2011-08-18 Thread arjoo kumar
find
1length1 (arr1)
2length 2(arr2)
3sum = length1 +length 2
4loops = sum /2
5... set two pointer (say ptr1 & ptr2) on arr[0]& arr2[0]
6 start loop for i =1 to loops
  if (*ptr1 <= *ptr2 )
   ptr1++
  else
   ptr2++

please manage it & remaining part send after some time

-- 
You received this message because you are subscribed to 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: Make My Trip *URGENT*

2011-08-18 Thread snehi jain
after the aptitude written round .. there were 15 questions in technical (c
& c++)
and 5 questions on coding in 45 min.


On Thu, Aug 18, 2011 at 11:01 PM, Anika Jain  wrote:

> the level is very easy.. i dont remember the questions .. but they are
> easy.. but tht makes cut off go very high
>
> On Thu, Aug 18, 2011 at 1:22 PM, monish001 wrote:
>
>> What level of questions for each- english, aptitute, coding? Can you
>> discuss some?
>>
>> -Monish
>>
>> On Aug 17, 5:06 pm, Anika Jain  wrote:
>> > there will be 15 english fill in the blanks, 5 series questn, 10
>> aptitude
>> > questions, 10 logical questions..
>> > then 10 c++ mcqs and 5 coding questions
>> >
>> > On Wed, Aug 17, 2011 at 5:28 PM, Brijesh Upadhyay <
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > brijeshupadhyay...@gmail.com> wrote:
>> > > has anyone given MMT written test.??  please reply , what is the
>> > > pattern of the paper?
>> >
>> > > --
>> > > You received this message because you are subscribed to 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] how to find median of two sorted arrays

2011-08-18 Thread Raghavan
How to find(efficiently) the median of two sorted arrays?

 ex: 1
arr1 => 2,4,5,6,18
arr2 => 5,10,25,30
*answer : 6*
*
*
ex:2
arr1 => 12,15,17,30,35
arr2 => 16,18,40
*answer : 17+18 / 2 = 17.5*
*
*
Share your ideas on it.
*
*


-- 
Thanks and Regards,
Raghavan KL

-- 
You received this message because you are subscribed to 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] Ebay Recruitment

2011-08-18 Thread ROHIT SINGHAL
@siva thanks bro for info.
@rahul thru Amcat so its offcampus tey given call to specific students

On Fri, Aug 19, 2011 at 1:12 AM, Rahul Tiwari wrote:

> @rohit singhal
> off-campus or on-campus ?
> if on-campus ---mention ur college plz 
>
>
>
>
>
>
> --
> Rahul Tiwari aka  " DONE "
> B Tech Final Year
> Information Technology
> Motilal Nehru National Institute of Technology , Allahabad
> 9838339030
>
>  --
> You received this message because you are subscribed to 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:
Rohit Singhal

-- 
You received this message because you are subscribed to 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] Sanjay Rajpal wants to chat

2011-08-18 Thread Sanjay Rajpal
---

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

If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-103fbc0bc-ebb781701b-kOgGGZw9fSXzat8Nsy65stCIsmI
You'll need to click this link to be able to chat with Sanjay Rajpal.

To get Gmail - a free email account from Google with over 2,800 megabytes of
storage - and chat with Sanjay Rajpal, visit:
http://mail.google.com/mail/a-103fbc0bc-ebb781701b-kOgGGZw9fSXzat8Nsy65stCIsmI

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

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

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

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

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

Thanks,
The Google Team

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

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

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Amazon question

2011-08-18 Thread Sanjay Rajpal
In the first loop, numbers are the numbers in the given array
but in the second loop, numbers are just natural numbers.

I forgot to mention as people may get confused.


*Regards

Sanju

Happy to Help :)*

-- 
You received this message because you are subscribed to 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 question

2011-08-18 Thread Sanjay Rajpal
I assume the no.s are in the range 1 to n.
Now XOR all the elements together.
Now XOR the result with all numbers from 1 to n in a loop.

The Repeated no. occurs thrice(the result is Repeated number) and all others
get XORed twice(give 0 result).

Thus the result will be the repeated number .

*Regards

Sanju

Happy to Help :)*



On Thu, Aug 18, 2011 at 8:42 PM, *$*  wrote:

> yes , but that constraint is not provided by the interviewer , hence ,
> solution of hash is not acceptable
>
> On Fri, Aug 19, 2011 at 8:58 AM, Dheeraj Sharma <
> dheerajsharma1...@gmail.com> wrote:
>
>> hash map is the solution provided the elements lie in a predefined range..
>>
>> On Fri, Aug 19, 2011 at 8:46 AM, *$*  wrote:
>>
>>> true. I agree , we can use additional memory which will be constant
>>> irrespective of counjt of elements.
>>>
>>> But using an hash wont be a constant memory as input can keep on varying.
>>>
>>> Thx,
>>> --Gopi
>>>
>>>
>>> On Fri, Aug 19, 2011 at 8:16 AM, Dipankar Patro wrote:
>>>
 O(1) space means constant space. It doesn't mean you can't use extra
 space.
 Refer here:
 http://stackoverflow.com/questions/2219109/what-does-this-mean-on-steps-and-o1-space

 According to the question you can definitely use a Hash Table for
 keeping hit record, as it will be a constant space (provided the range of
 numbers is known).

 In case the range of numbers is not known, BST will be close answer.
 Since only one element will be repeating, the process of making the BST can
 be stopped when the first repeating element is caught. BUT, this will be
 O(n) space, as the number of nodes in BST will be n-1 in worst case.

 On 19 August 2011 07:59, *$*  wrote:

> only once
>
>
> On Fri, Aug 19, 2011 at 7:57 AM, saurabh singh wrote:
>
>> The element is repeated only once or can be repeated k number of
>> times??
>>
>> On Fri, Aug 19, 2011 at 7:50 AM, *$* wrote:
>>
>>> I think we are using hash , which is like extra spaace , but as per
>>> the question , O(s) = 1.
>>>
>>> Thx,
>>> --Gopi
>>>
>>>
>>> On Fri, Aug 19, 2011 at 2:15 AM, icy`  wrote:
>>>
 #!/usr/bin/ruby -w
 #array of unsorted positive integers
 # find the [only] one that is duplicated

 arr= [97,2,54,26,67,12,1,19,44,4,29,36,67,14,93,22,39,89]
 h = Hash.new(0)

 arr.each {|n|
h[n]+=1
(puts n; break) if h[n]==2
 }

 #output
 #67

 I hope this meets the requirements ;P

 On Aug 18, 3:15 pm, "*$*"  wrote:
 > How to find duplicate element (only one element is repeated) from
 an array
 > of unsorted positive integers..
 > time complexity .. O(n)
 > space .. o(1).

 --
 You received this message because you are subscribed to 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.


>>>
>>>
>>> --
>>> Thx,
>>> --Gopi
>>>
>>>
>>>  --
>>> You received this message because you are subscribed to 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.
>>>
>>
>>
>>
>> --
>> Saurabh Singh
>> B.Tech (Computer Science)
>> MNNIT ALLAHABAD
>>
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> Thx,
> --Gopi
>
>  --
> You received this message because you are subscribed to 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 

Re: [algogeeks] Puzzle

2011-08-18 Thread Dheeraj Sharma
M and N are married

On Fri, Aug 19, 2011 at 5:19 AM, Abhishek Sharma wrote:

> M (hint: replace ü and û with their actual meaning.. u 'll understand)
>
>
> On Fri, Aug 19, 2011 at 4:10 AM, payal gupta  wrote:
>
>> was there anything more specified
>> Regards,
>> PAYAL GUPTA
>>
>>
>> On Fri, Aug 19, 2011 at 3:29 AM, Aditya Virmani > > wrote:
>>
>>> If ü - Married
>>> û - Not Married and
>>> M-ü N-û
>>> N-ü L-û
>>> L-û M-ü
>>> Who is married?
>>>
>>> qn was put up in this way, asked in Deloitte 2004.
>>>
>>> --
>>> You received this message because you are subscribed to 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.
>



-- 
*Dheeraj Sharma*
Comp Engg.
NIT Kurukshetra
+91 8950264227

-- 
You received this message because you are subscribed to 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 question

2011-08-18 Thread *$*
yes , but that constraint is not provided by the interviewer , hence ,
solution of hash is not acceptable

On Fri, Aug 19, 2011 at 8:58 AM, Dheeraj Sharma  wrote:

> hash map is the solution provided the elements lie in a predefined range..
>
> On Fri, Aug 19, 2011 at 8:46 AM, *$*  wrote:
>
>> true. I agree , we can use additional memory which will be constant
>> irrespective of counjt of elements.
>>
>> But using an hash wont be a constant memory as input can keep on varying.
>>
>> Thx,
>> --Gopi
>>
>>
>> On Fri, Aug 19, 2011 at 8:16 AM, Dipankar Patro wrote:
>>
>>> O(1) space means constant space. It doesn't mean you can't use extra
>>> space.
>>> Refer here:
>>> http://stackoverflow.com/questions/2219109/what-does-this-mean-on-steps-and-o1-space
>>>
>>> According to the question you can definitely use a Hash Table for keeping
>>> hit record, as it will be a constant space (provided the range of numbers is
>>> known).
>>>
>>> In case the range of numbers is not known, BST will be close answer.
>>> Since only one element will be repeating, the process of making the BST can
>>> be stopped when the first repeating element is caught. BUT, this will be
>>> O(n) space, as the number of nodes in BST will be n-1 in worst case.
>>>
>>> On 19 August 2011 07:59, *$*  wrote:
>>>
 only once


 On Fri, Aug 19, 2011 at 7:57 AM, saurabh singh wrote:

> The element is repeated only once or can be repeated k number of
> times??
>
> On Fri, Aug 19, 2011 at 7:50 AM, *$*  wrote:
>
>> I think we are using hash , which is like extra spaace , but as per
>> the question , O(s) = 1.
>>
>> Thx,
>> --Gopi
>>
>>
>> On Fri, Aug 19, 2011 at 2:15 AM, icy`  wrote:
>>
>>> #!/usr/bin/ruby -w
>>> #array of unsorted positive integers
>>> # find the [only] one that is duplicated
>>>
>>> arr= [97,2,54,26,67,12,1,19,44,4,29,36,67,14,93,22,39,89]
>>> h = Hash.new(0)
>>>
>>> arr.each {|n|
>>>h[n]+=1
>>>(puts n; break) if h[n]==2
>>> }
>>>
>>> #output
>>> #67
>>>
>>> I hope this meets the requirements ;P
>>>
>>> On Aug 18, 3:15 pm, "*$*"  wrote:
>>> > How to find duplicate element (only one element is repeated) from
>>> an array
>>> > of unsorted positive integers..
>>> > time complexity .. O(n)
>>> > space .. o(1).
>>>
>>> --
>>> You received this message because you are subscribed to 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.
>>>
>>>
>>
>>
>> --
>> Thx,
>> --Gopi
>>
>>
>>  --
>> You received this message because you are subscribed to 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.
>>
>
>
>
> --
> Saurabh Singh
> B.Tech (Computer Science)
> MNNIT ALLAHABAD
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



 --
 Thx,
 --Gopi

  --
 You received this message because you are subscribed to 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.
>>>
>>
>>
>>
>> --
>> Thx,
>> --Gopi
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" g

Re: [algogeeks] Re: Answer this !!

2011-08-18 Thread Dheeraj Sharma
override is not removal..u can still call the base variables and functions..
2 would be the answer i gues..

On Fri, Aug 19, 2011 at 8:34 AM, Dipankar Patro  wrote:

> Overriding doesn't remove the function. It just changes the function
> definition.
>
> So 2 will be the answer.
>
>
> On 19 August 2011 00:33, siddharth srivastava  wrote:
>
>>
>>
>> On 19 August 2011 00:31, priya ramesh wrote:
>>
>>> it can remove methods defined in base class as well?? By overriding a
>>> virtual base class func??
>>>
>>
>>
>> I don't think that overriding is considered as removing the function  from
>> base class
>>
>>>  --
>>> You received this message because you are subscribed to 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.
>>
>
>
>
> --
>
> ___
>
> 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.
>



-- 
*Dheeraj Sharma*
Comp Engg.
NIT Kurukshetra
+91 8950264227

-- 
You received this message because you are subscribed to 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 question

2011-08-18 Thread Dheeraj Sharma
hash map is the solution provided the elements lie in a predefined range..

On Fri, Aug 19, 2011 at 8:46 AM, *$*  wrote:

> true. I agree , we can use additional memory which will be constant
> irrespective of counjt of elements.
>
> But using an hash wont be a constant memory as input can keep on varying.
>
> Thx,
> --Gopi
>
>
> On Fri, Aug 19, 2011 at 8:16 AM, Dipankar Patro wrote:
>
>> O(1) space means constant space. It doesn't mean you can't use extra
>> space.
>> Refer here:
>> http://stackoverflow.com/questions/2219109/what-does-this-mean-on-steps-and-o1-space
>>
>> According to the question you can definitely use a Hash Table for keeping
>> hit record, as it will be a constant space (provided the range of numbers is
>> known).
>>
>> In case the range of numbers is not known, BST will be close answer. Since
>> only one element will be repeating, the process of making the BST can be
>> stopped when the first repeating element is caught. BUT, this will be O(n)
>> space, as the number of nodes in BST will be n-1 in worst case.
>>
>> On 19 August 2011 07:59, *$*  wrote:
>>
>>> only once
>>>
>>>
>>> On Fri, Aug 19, 2011 at 7:57 AM, saurabh singh wrote:
>>>
 The element is repeated only once or can be repeated k number of times??

 On Fri, Aug 19, 2011 at 7:50 AM, *$*  wrote:

> I think we are using hash , which is like extra spaace , but as per the
> question , O(s) = 1.
>
> Thx,
> --Gopi
>
>
> On Fri, Aug 19, 2011 at 2:15 AM, icy`  wrote:
>
>> #!/usr/bin/ruby -w
>> #array of unsorted positive integers
>> # find the [only] one that is duplicated
>>
>> arr= [97,2,54,26,67,12,1,19,44,4,29,36,67,14,93,22,39,89]
>> h = Hash.new(0)
>>
>> arr.each {|n|
>>h[n]+=1
>>(puts n; break) if h[n]==2
>> }
>>
>> #output
>> #67
>>
>> I hope this meets the requirements ;P
>>
>> On Aug 18, 3:15 pm, "*$*"  wrote:
>> > How to find duplicate element (only one element is repeated) from an
>> array
>> > of unsorted positive integers..
>> > time complexity .. O(n)
>> > space .. o(1).
>>
>> --
>> You received this message because you are subscribed to 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.
>>
>>
>
>
> --
> Thx,
> --Gopi
>
>
>  --
> You received this message because you are subscribed to 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.
>



 --
 Saurabh Singh
 B.Tech (Computer Science)
 MNNIT ALLAHABAD


  --
 You received this message because you are subscribed to the Google
 Groups "Algorithm Geeks" group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.

>>>
>>>
>>>
>>> --
>>> Thx,
>>> --Gopi
>>>
>>>  --
>>> You received this message because you are subscribed to 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.
>>
>
>
>
> --
> Thx,
> --Gopi
>
>  --
> You received this message because you are subscribed to 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.
>



-- 
*Dheeraj Sharma*
Comp Engg.
NIT Kurukshetra
+91 8950264227

-- 
You rece

Re: [algogeeks] Re: Amazon question

2011-08-18 Thread *$*
true. I agree , we can use additional memory which will be constant
irrespective of counjt of elements.

But using an hash wont be a constant memory as input can keep on varying.

Thx,
--Gopi

On Fri, Aug 19, 2011 at 8:16 AM, Dipankar Patro  wrote:

> O(1) space means constant space. It doesn't mean you can't use extra space.
> Refer here:
> http://stackoverflow.com/questions/2219109/what-does-this-mean-on-steps-and-o1-space
>
> According to the question you can definitely use a Hash Table for keeping
> hit record, as it will be a constant space (provided the range of numbers is
> known).
>
> In case the range of numbers is not known, BST will be close answer. Since
> only one element will be repeating, the process of making the BST can be
> stopped when the first repeating element is caught. BUT, this will be O(n)
> space, as the number of nodes in BST will be n-1 in worst case.
>
> On 19 August 2011 07:59, *$*  wrote:
>
>> only once
>>
>>
>> On Fri, Aug 19, 2011 at 7:57 AM, saurabh singh wrote:
>>
>>> The element is repeated only once or can be repeated k number of times??
>>>
>>> On Fri, Aug 19, 2011 at 7:50 AM, *$*  wrote:
>>>
 I think we are using hash , which is like extra spaace , but as per the
 question , O(s) = 1.

 Thx,
 --Gopi


 On Fri, Aug 19, 2011 at 2:15 AM, icy`  wrote:

> #!/usr/bin/ruby -w
> #array of unsorted positive integers
> # find the [only] one that is duplicated
>
> arr= [97,2,54,26,67,12,1,19,44,4,29,36,67,14,93,22,39,89]
> h = Hash.new(0)
>
> arr.each {|n|
>h[n]+=1
>(puts n; break) if h[n]==2
> }
>
> #output
> #67
>
> I hope this meets the requirements ;P
>
> On Aug 18, 3:15 pm, "*$*"  wrote:
> > How to find duplicate element (only one element is repeated) from an
> array
> > of unsorted positive integers..
> > time complexity .. O(n)
> > space .. o(1).
>
> --
> You received this message because you are subscribed to 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.
>
>


 --
 Thx,
 --Gopi


  --
 You received this message because you are subscribed to 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.

>>>
>>>
>>>
>>> --
>>> Saurabh Singh
>>> B.Tech (Computer Science)
>>> MNNIT ALLAHABAD
>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>
>>
>> --
>> Thx,
>> --Gopi
>>
>>  --
>> You received this message because you are subscribed to 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.
>



-- 
Thx,
--Gopi

-- 
You received this message because you are subscribed to 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: Answer this !!

2011-08-18 Thread Dipankar Patro
Overriding doesn't remove the function. It just changes the function
definition.

So 2 will be the answer.

On 19 August 2011 00:33, siddharth srivastava  wrote:

>
>
> On 19 August 2011 00:31, priya ramesh wrote:
>
>> it can remove methods defined in base class as well?? By overriding a
>> virtual base class func??
>>
>
>
> I don't think that overriding is considered as removing the function  from
> base class
>
>>  --
>> You received this message because you are subscribed to 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.
>



-- 
___

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.



Re: [algogeeks] Re: Amazon question

2011-08-18 Thread Dipankar Patro
O(1) space means constant space. It doesn't mean you can't use extra space.
Refer here:
http://stackoverflow.com/questions/2219109/what-does-this-mean-on-steps-and-o1-space

According to the question you can definitely use a Hash Table for keeping
hit record, as it will be a constant space (provided the range of numbers is
known).

In case the range of numbers is not known, BST will be close answer. Since
only one element will be repeating, the process of making the BST can be
stopped when the first repeating element is caught. BUT, this will be O(n)
space, as the number of nodes in BST will be n-1 in worst case.

On 19 August 2011 07:59, *$*  wrote:

> only once
>
>
> On Fri, Aug 19, 2011 at 7:57 AM, saurabh singh wrote:
>
>> The element is repeated only once or can be repeated k number of times??
>>
>> On Fri, Aug 19, 2011 at 7:50 AM, *$*  wrote:
>>
>>> I think we are using hash , which is like extra spaace , but as per the
>>> question , O(s) = 1.
>>>
>>> Thx,
>>> --Gopi
>>>
>>>
>>> On Fri, Aug 19, 2011 at 2:15 AM, icy`  wrote:
>>>
 #!/usr/bin/ruby -w
 #array of unsorted positive integers
 # find the [only] one that is duplicated

 arr= [97,2,54,26,67,12,1,19,44,4,29,36,67,14,93,22,39,89]
 h = Hash.new(0)

 arr.each {|n|
h[n]+=1
(puts n; break) if h[n]==2
 }

 #output
 #67

 I hope this meets the requirements ;P

 On Aug 18, 3:15 pm, "*$*"  wrote:
 > How to find duplicate element (only one element is repeated) from an
 array
 > of unsorted positive integers..
 > time complexity .. O(n)
 > space .. o(1).

 --
 You received this message because you are subscribed to 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.


>>>
>>>
>>> --
>>> Thx,
>>> --Gopi
>>>
>>>
>>>  --
>>> You received this message because you are subscribed to 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.
>>>
>>
>>
>>
>> --
>> Saurabh Singh
>> B.Tech (Computer Science)
>> MNNIT ALLAHABAD
>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> Thx,
> --Gopi
>
>  --
> You received this message because you are subscribed to 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.



Re: [algogeeks] Re: longest repeated substring

2011-08-18 Thread saurabh singh
substrings and subsets are two different things.
If you want an easy solution brute force it...:)
Its not that difficult to code  a suffix tree if it makes you a
millionare:)

On Thu, Aug 18, 2011 at 7:59 PM, Arun Vishwanathan
wrote:

> am just asking but how can u get all possible substrings in O(n square)
> time when there are 2 power N of them actually?
>
>
>
> On Thu, Aug 18, 2011 at 4:20 PM, DheerajSharma <
> dheerajsharma1...@gmail.com> wrote:
>
>> O(n^2) i guess..
>> We can save all possible substrings..(in two loops it can be done) in
>> a hash map..as key..and the value as COUNT..then we can..search for
>> the most occurring substring!!
>>  u said for non - efficient ;)
>>
>> On Aug 18, 6:07 pm, MAC  wrote:
>> > A string can have many sub-strings inside it . find the longest
>> substring
>> > which is repeated maximum number of times. in case of 2 options repeated
>> > same number of times , largest one needs to be ouput and in case same
>> length
>> > and same number of times repeated , anyone can be outputted.
>> >
>> > abcdefcbcdfbcdefef  has bcd and ef repeated multiple times but bcd count
>> >
>> > trie apraoch is fine , but in interview difficult to code ,.so
>> definately
>> > some other solution is requested . please also give non-efficient , but
>> easy
>> > to code solution if any
>> > --
>> > thanks
>> > --mac
>>
>> --
>> You received this message because you are subscribed to 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.
>>
>>
>
>
> --
>  "People often say that motivation doesn't last. Well, neither does
> bathing - that's why we recommend it daily."
>
>  --
> You received this message because you are subscribed to 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.
>



-- 
Saurabh Singh
B.Tech (Computer Science)
MNNIT ALLAHABAD

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from 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: Book

2011-08-18 Thread Swati Sarraf
Hey Navneet , which book are you talking abt- Data structure and algo made
easy OR Data structure Puzzles ?


On Thu, Aug 18, 2011 at 10:16 PM, Navneet  wrote:

> My two cents on this book -
>
> Too lengthy and written more like an exhaustive tutorial rather than
> "idea" book. I purchased hard copy but sold it for didn't like it
> much.
>
> On Aug 19, 2:56 am, Swati Sarraf  wrote:
> > Hi guys,
> >
> > Does any one of u has the book - Data Structures and Algorithms made Easy
> -
> > by Narasimha Karumanchi
> >  .>
> >
> > On Thu, Aug 18, 2011 at 4:15 PM, Sanjay Rajpal <
> sanjayrajpal108...@gmail.com
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > > wrote:
> > > Hi friends,
> >
> > > Does any one of u has the book
> > > Data Structure Puzzles: Puzzle your mind for Data Structures
> > > <
> http://www.amazon.com/Data-Structure-Puzzles-Puzzle-Structures/dp/146..
> .>by
> > > Narasimha Karumanchi ?
> >
> > > Plz mail this book to me or post the link as soon as possible..
> >
> > >  --
> > > You received this message because you are subscribed to 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,
> > Swati Sarraf
>
> --
> You received this message because you are subscribed to 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,
Swati Sarraf

-- 
You received this message because you are subscribed to 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 question

2011-08-18 Thread *$*
only once

On Fri, Aug 19, 2011 at 7:57 AM, saurabh singh  wrote:

> The element is repeated only once or can be repeated k number of times??
>
> On Fri, Aug 19, 2011 at 7:50 AM, *$*  wrote:
>
>> I think we are using hash , which is like extra spaace , but as per the
>> question , O(s) = 1.
>>
>> Thx,
>> --Gopi
>>
>>
>> On Fri, Aug 19, 2011 at 2:15 AM, icy`  wrote:
>>
>>> #!/usr/bin/ruby -w
>>> #array of unsorted positive integers
>>> # find the [only] one that is duplicated
>>>
>>> arr= [97,2,54,26,67,12,1,19,44,4,29,36,67,14,93,22,39,89]
>>> h = Hash.new(0)
>>>
>>> arr.each {|n|
>>>h[n]+=1
>>>(puts n; break) if h[n]==2
>>> }
>>>
>>> #output
>>> #67
>>>
>>> I hope this meets the requirements ;P
>>>
>>> On Aug 18, 3:15 pm, "*$*"  wrote:
>>> > How to find duplicate element (only one element is repeated) from an
>>> array
>>> > of unsorted positive integers..
>>> > time complexity .. O(n)
>>> > space .. o(1).
>>>
>>> --
>>> You received this message because you are subscribed to 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.
>>>
>>>
>>
>>
>> --
>> Thx,
>> --Gopi
>>
>>
>>  --
>> You received this message because you are subscribed to 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.
>>
>
>
>
> --
> Saurabh Singh
> B.Tech (Computer Science)
> MNNIT ALLAHABAD
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Thx,
--Gopi

-- 
You received this message because you are subscribed to 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 question

2011-08-18 Thread saurabh singh
The element is repeated only once or can be repeated k number of times??

On Fri, Aug 19, 2011 at 7:50 AM, *$*  wrote:

> I think we are using hash , which is like extra spaace , but as per the
> question , O(s) = 1.
>
> Thx,
> --Gopi
>
>
> On Fri, Aug 19, 2011 at 2:15 AM, icy`  wrote:
>
>> #!/usr/bin/ruby -w
>> #array of unsorted positive integers
>> # find the [only] one that is duplicated
>>
>> arr= [97,2,54,26,67,12,1,19,44,4,29,36,67,14,93,22,39,89]
>> h = Hash.new(0)
>>
>> arr.each {|n|
>>h[n]+=1
>>(puts n; break) if h[n]==2
>> }
>>
>> #output
>> #67
>>
>> I hope this meets the requirements ;P
>>
>> On Aug 18, 3:15 pm, "*$*"  wrote:
>> > How to find duplicate element (only one element is repeated) from an
>> array
>> > of unsorted positive integers..
>> > time complexity .. O(n)
>> > space .. o(1).
>>
>> --
>> You received this message because you are subscribed to 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.
>>
>>
>
>
> --
> Thx,
> --Gopi
>
>
>  --
> You received this message because you are subscribed to 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.
>



-- 
Saurabh Singh
B.Tech (Computer Science)
MNNIT ALLAHABAD

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from 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 question

2011-08-18 Thread *$*
I think we are using hash , which is like extra spaace , but as per the
question , O(s) = 1.

Thx,
--Gopi

On Fri, Aug 19, 2011 at 2:15 AM, icy`  wrote:

> #!/usr/bin/ruby -w
> #array of unsorted positive integers
> # find the [only] one that is duplicated
>
> arr= [97,2,54,26,67,12,1,19,44,4,29,36,67,14,93,22,39,89]
> h = Hash.new(0)
>
> arr.each {|n|
>h[n]+=1
>(puts n; break) if h[n]==2
> }
>
> #output
> #67
>
> I hope this meets the requirements ;P
>
> On Aug 18, 3:15 pm, "*$*"  wrote:
> > How to find duplicate element (only one element is repeated) from an
> array
> > of unsorted positive integers..
> > time complexity .. O(n)
> > space .. o(1).
>
> --
> You received this message because you are subscribed to 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.
>
>


-- 
Thx,
--Gopi

-- 
You received this message because you are subscribed to 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: Book

2011-08-18 Thread Navneet
My two cents on this book -

Too lengthy and written more like an exhaustive tutorial rather than
"idea" book. I purchased hard copy but sold it for didn't like it
much.

On Aug 19, 2:56 am, Swati Sarraf  wrote:
> Hi guys,
>
> Does any one of u has the book - Data Structures and Algorithms made Easy -
> by Narasimha Karumanchi
> 
>
> On Thu, Aug 18, 2011 at 4:15 PM, Sanjay Rajpal 
>
>
>
>
>
>
>
>
> > wrote:
> > Hi friends,
>
> > Does any one of u has the book
> > Data Structure Puzzles: Puzzle your mind for Data Structures
> > by
> > Narasimha Karumanchi ?
>
> > Plz mail this book to me or post the link as soon as possible..
>
> >  --
> > You received this message because you are subscribed to 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,
> Swati Sarraf

-- 
You received this message because you are subscribed to 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: Question from Google interview

2011-08-18 Thread Navneet
I have an answer to the problem which requires a single pass of string
to get the output string. (Though debatable if it covers all cases)

Look to make it as time efficient as possible.

On Aug 19, 2:28 am, Dave  wrote:
> @Icy: We agree that you have to look ahead in order to set the spaces
> correctly. The only point of difference is whether you choose to
> become more greedy or less greedy when looking ahead fails.
>
> Dave
>
> On Aug 18, 2:55 pm, "icy`"  wrote:
>
>
>
>
>
>
>
> > Well no, I would think it would match "Balls"  for him, since it is
> > greedy --> it would try to match as much as possible that works/is in
> > dict.  So I have to agree with Aditya here, but I would go from the
> > back/right to the left. So I would first get " round",  then hopefully
> > " are round"  and finally "Balls are round".
>
> > Now it gets tricky if the remaining left section cannot be broken into
> > words.  Then we'd have to backtrack once and take the next less-greedy
> > match, and try again.  If that fails, take even less greedier match ,
> > or backtrack yet again.
>
> > On Aug 18, 1:05 pm, Dave  wrote:
>
> > > @Aditya: You probably have to be a bit more careful than that. You
> > > can't add the space until both the first part is a word in the
> > > dictionary and the rest of the string can also be broken into words in
> > > the dictionary. Consider "Ballsareround." Your algorithm seems to put
> > > a space after the second "l", but then no initial part of "sareround"
> > > may be in your dictionary. In that case, you have to reject that space
> > > and continue until you get to a division point such that both the
> > > first part is in the dictionary and the second part can be broken into
> > > words. Sounds like a good place for recursion.
>
> > > Dave
>
> > > On Aug 18, 10:52 am, aditya kumar 
> > > wrote:
>
> > > > not sure abt the algo but we can think in terms of tokeninzing . ie go 
> > > > for
> > > > greedy method . greedy looks for maximum match . extract the token and 
> > > > match
> > > > with the dictionary word . if match found then add the additional space 
> > > > else
> > > > look for next token .
> > > > On Thu, Aug 18, 2011 at 9:10 PM, Navneet Gupta 
> > > > wrote:
>
> > > > > Given a string containing multiple words such that spaces between 
> > > > > words is
> > > > > missing. Also, you have a dictionary containing valid words.
>
> > > > > Ex. "Thatwouldbefantastic"
>
> > > > > Output a string with proper spaces inserted.
>
> > > > > Output - "That would be fantastic"
>
> > > > > The case of words like bandwidth present can be discounted.
>
> > > > > --
> > > > > Regards,
> > > > > Navneet
>
> > > > > --
> > > > > You received this message because you are subscribed to 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] Puzzle

2011-08-18 Thread Abhishek Sharma
M (hint: replace ü and û with their actual meaning.. u 'll understand)

On Fri, Aug 19, 2011 at 4:10 AM, payal gupta  wrote:

> was there anything more specified
> Regards,
> PAYAL GUPTA
>
>
> On Fri, Aug 19, 2011 at 3:29 AM, Aditya Virmani 
> wrote:
>
>> If ü - Married
>> û - Not Married and
>> M-ü N-û
>> N-ü L-û
>> L-û M-ü
>> Who is married?
>>
>> qn was put up in this way, asked in Deloitte 2004.
>>
>> --
>> You received this message because you are subscribed to 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] Puzzle

2011-08-18 Thread payal gupta
was there anything more specified
Regards,
PAYAL GUPTA

On Fri, Aug 19, 2011 at 3:29 AM, Aditya Virmani wrote:

> If ü - Married
> û - Not Married and
> M-ü N-û
> N-ü L-û
> L-û M-ü
> Who is married?
>
> qn was put up in this way, asked in Deloitte 2004.
>
> --
> You received this message because you are subscribed to 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] Maximum profit

2011-08-18 Thread pg@manit
i came across a questioncud anyone suggest how to go with this
problem...to me it seems to be based on greedy algo


You are now incharge of a private hall. People book your hall for
different purposes like marriage, meetings and other ceremonies we
will consider all these events just as a “booking”. You are a very
famous person and so is your hall for various facilities. All people
want to perform their ceremonies in this hall so they book your hall
beforehand. Now you have a problem ,there are many request
applications for booking . Each application mentions the start date
and no. of days for which it wants to do the booking along with the
cost per day you will be pad for that booking. Since you are
businessman you have to allot the hall in such a way that you gain
maximum profit(maximum amount) out of this. Things you need to keep in
mind to make things simpler is : =>You need not to mention the month
or year , you can assume the dates are of same month . =>Once you
allot the hall to someone you can’t allot it to anyone else till the
ceremony is not over.
=>Month is only of 30 days. Any start date between 1 and 30(inclusive)
is valid.
=> Booking is done for full day . If your event(to which you allot the
hall) ends on suppose 12th of the month you cannot give hall to anyone
on 12th you can give on 13th For Ex: two persons request for a
booking: BookingReq 1 : StartDate : 12 No. of Days : 3 Amount Perday:
1000 Booking Req2: StartDate : 14 No .of Days 1: Amount Perday : 2000
Then if you allot this hall to First Person.. it is occupied for next
3 days and you can’t give it to second person. “Your Task is to output
the BookingReq no. to which you can allot hall to gain maximum
profit(maximum amount)”. Input Specification: First Line of input
consist of number of test cases M. FirstLine of each test case consist
of no. of booking requests N . Followed by N lines.Where Each line
contains 3 integers StartDate ,No. of days booking is required and
Amount per day , each integer separated by a space. New test case
start on a new Line. 1<= Startdate <=30 Ouput Specification Output
contains M lines . Each line gives the maximum amount of money you can
get by allotting the hall. Sample Input: 1 // no. of test cases 3 //3
booking requests for test case 1 3 4 1200
2 7 900
13 2 200 Ouput: 8900



Regards,
PAYAL GUPTA

-- 
You received this message because you are subscribed to 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: shortest swapping rows

2011-08-18 Thread Prakash D
hey, thanks..
but if it needs many iteration, then we've to check each time whether the
array is sorted.. is there any better way for swapping

On Thu, Aug 18, 2011 at 5:02 AM, Brijesh Upadhyay <
brijeshupadhyay...@gmail.com> wrote:

> IT is the question..
> You are given an N x N matrix with 0 and 1 values. You can swap any two
> adjacent rows of the matrix.
>
> Your goal is to have all the 1 values in the matrix below or on the main
> diagonal. That is, for each X where 1 ≤ X ≤ N, there must be no 1 values in
> row X
>
> that are to the right of column X.
>
> Return the minimum number of row swaps you need to achieve the goal.
>
> Input
>
> The first line of input gives the number of cases, T. T test cases follow.
> The first line of each test case has one integer, N. Each of the next N
> lines contains N characters. Each character is either 0 or 1.
>
> Output
>
> For each test case, output
>
> Case #X: K
> where X is the test case number, starting from 1, and K is the minimum
> number of row swaps needed to have all the 1 values in the matrix below or
> on the main
>
> diagonal.
>
> You are guaranteed that there is a solution for each test case.
>
> Limits
>
> 1 ≤ T ≤ 60
>
> 1 ≤ N ≤ 8
>
> Input
>
>
> 3
> 2
> 10
> 11
> 3
> 001
> 100
> 010
> 4
> 1110
> 1100
> 1100
> 1000
> Output
> Case #1: 0
> Case #2: 2
> Case #3: 4
>
> --
> 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/-/aJHYyoc0z5sJ.
>
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from 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-08-18 Thread Aditya Virmani
If ü - Married
û - Not Married and
M-ü N-û
N-ü L-û
L-û M-ü
Who is married?

qn was put up in this way, asked in Deloitte 2004.

-- 
You received this message because you are subscribed to 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] Book

2011-08-18 Thread Swati Sarraf
Hi guys,

Does any one of u has the book - Data Structures and Algorithms made Easy -
by Narasimha Karumanchi


On Thu, Aug 18, 2011 at 4:15 PM, Sanjay Rajpal  wrote:

> Hi friends,
>
> Does any one of u has the book
> Data Structure Puzzles: Puzzle your mind for Data Structures
> by
> Narasimha Karumanchi ?
>
> Plz mail this book to me or post the link as soon as possible..
>
>
>  --
> You received this message because you are subscribed to 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,
Swati Sarraf

-- 
You received this message because you are subscribed to 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: Question from Google interview

2011-08-18 Thread Dave
@Icy: We agree that you have to look ahead in order to set the spaces
correctly. The only point of difference is whether you choose to
become more greedy or less greedy when looking ahead fails.

Dave

On Aug 18, 2:55 pm, "icy`"  wrote:
> Well no, I would think it would match "Balls"  for him, since it is
> greedy --> it would try to match as much as possible that works/is in
> dict.  So I have to agree with Aditya here, but I would go from the
> back/right to the left. So I would first get " round",  then hopefully
> " are round"  and finally "Balls are round".
>
> Now it gets tricky if the remaining left section cannot be broken into
> words.  Then we'd have to backtrack once and take the next less-greedy
> match, and try again.  If that fails, take even less greedier match ,
> or backtrack yet again.
>
> On Aug 18, 1:05 pm, Dave  wrote:
>
>
>
> > @Aditya: You probably have to be a bit more careful than that. You
> > can't add the space until both the first part is a word in the
> > dictionary and the rest of the string can also be broken into words in
> > the dictionary. Consider "Ballsareround." Your algorithm seems to put
> > a space after the second "l", but then no initial part of "sareround"
> > may be in your dictionary. In that case, you have to reject that space
> > and continue until you get to a division point such that both the
> > first part is in the dictionary and the second part can be broken into
> > words. Sounds like a good place for recursion.
>
> > Dave
>
> > On Aug 18, 10:52 am, aditya kumar 
> > wrote:
>
> > > not sure abt the algo but we can think in terms of tokeninzing . ie go for
> > > greedy method . greedy looks for maximum match . extract the token and 
> > > match
> > > with the dictionary word . if match found then add the additional space 
> > > else
> > > look for next token .
> > > On Thu, Aug 18, 2011 at 9:10 PM, Navneet Gupta 
> > > wrote:
>
> > > > Given a string containing multiple words such that spaces between words 
> > > > is
> > > > missing. Also, you have a dictionary containing valid words.
>
> > > > Ex. "Thatwouldbefantastic"
>
> > > > Output a string with proper spaces inserted.
>
> > > > Output - "That would be fantastic"
>
> > > > The case of words like bandwidth present can be discounted.
>
> > > > --
> > > > Regards,
> > > > Navneet
>
> > > > --
> > > > You received this message because you are subscribed to 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: De shaw ques!

2011-08-18 Thread Dave
@Priya: Since gcd(935,38) = 1, any remainder from 0 to 37 can result.

Dave

On Aug 17, 7:09 am, priya ramesh 
wrote:
> if a number is divided by 935 remainder is 69. if same no. is divided by 38,
> what will be the remainder?

-- 
You received this message because you are subscribed to 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: calculate a/b without using ‘*’, ‘/’’ and ‘%’

2011-08-18 Thread Dave
@Arun: Oops. It looks like the while loop condition should be  b <= a
instead of  b < a, and the if condition within the for loop should be
a >= b  instead of  a > b. I'm glad I equivocated with the phrase
"would look something like."

With a = 24 and b = 3, the while loop shifts b left and increments k
until b > 24. In particular, the while loop exits with b = 48 and k =
4. Thus, the for loop is executed 4 times. The first time, q is
doubled to 0, b is right shifted 1 to 24. Since 24 >= 24, a is reduced
to 0 and q is set to 0 | 1 = 1. In the next three loop iterations, q
is doubled each time, yielding q = 8. This eventually is the return
value.

Let me know if you find other problems.

Dave

On Aug 18, 1:09 pm, Arun Vishwanathan  wrote:
> @dave: in your algorithm, I have a doubt in the second loop( for loop ).
> q=0 initially so the first q<<1 stays zero and then q|=1 makes q=1 now.
> 1 then becomes x 2 and then again with the OR 2 becomes 3.
>  3 becomes 6 and with the OR 6 becomes 7.
> for example if i need to do 24/3, according to the code k=3 after while loop
> and then the for loop terminates with q as 7 as i mentioned the steps
> above.Have i got the understanding of the code wrong?
>
>
>
>
>
> On Thu, Aug 18, 2011 at 7:18 PM, Dave  wrote:
> > @Dheeraj: What about it? It doesn't give the quotient. What is it
> > supposed to do?
>
> > Dave
>
> > On Aug 18, 11:06 am, DheerajSharma 
> > wrote:
> > > wat about shifting 'a' right by floar(log2(b)) and adding 1 to it..
>
> > > On Aug 18, 8:48 pm, aditya kumar  wrote:
>
> > > > how abt subtracting . like a=a-b till a becomes zero . no of times
> > > > subtraction is done is the answer .
> > > > correct me if i am wrong !
>
> > > > On Thu, Aug 18, 2011 at 8:59 PM, Dave  wrote:
> > > > > @Radha: You could simulate long division. It would look something
> > like
> > > > > this:
>
> > > > > int divide(int a, int b)
> > > > > {
> > > > >    int i, k=0, q=0, s=1;
> > > > > // error checking
> > > > >    if( b == 0 ) return 0 // return 0 for division by zero
> > > > > // handle signs
> > > > >    if( a < 0 )
> > > > >    {
> > > > >        a = -a;
> > > > >        s = -1;
> > > > >    }
> > > > >    if( b < 0 )
> > > > >    {
> > > > >        b = -b;
> > > > >        s = -s;
> > > > >    }
> > > > > // quick cases
> > > > >    if( a < b )
> > > > >        return 0;
> > > > >    if( a == b )
> > > > >        return s;
> > > > > // shift divisor to align with dividend
> > > > >    while( b < a )
> > > > >    {
> > > > >        b <<= 1;
> > > > >        ++k;
> > > > >    }
> > > > > // perform k steps of long division in binary
> > > > >    for( i = 0 ; i < k ; ++i )
> > > > >    {
> > > > >        q <<= 1;
> > > > >        b >>= 1;
> > > > >        if( a > b )
> > > > >        {
> > > > >            a -= b;
> > > > >            q |= 1;
> > > > >        }
> > > > >    }
> > > > > // apply sign to result
> > > > >    if( s < 0 )
> > > > >        q = -q;
>
> > > > >    return q;
> > > > > }
>
> > > > > Dave
>
> > > > > On Aug 18, 8:56 am, radha krishnan 
> > > > > wrote:
> > > > > > how to do using BIT manipulation ?
>
> > > > > --
> > > > > You received this message because you are subscribed to 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.
>
> --
>  "People often say that motivation doesn't last. Well, neither does bathing
> - that's why we recommend it daily."

-- 
You received this message because you are subscribed to 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] Equivalent malloc statement for calloc

2011-08-18 Thread Beginner
calloc(10*sizeof(int));

-- 
You received this message because you are subscribed to 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: Amazon question

2011-08-18 Thread icy`
#!/usr/bin/ruby -w
#array of unsorted positive integers
# find the [only] one that is duplicated

arr= [97,2,54,26,67,12,1,19,44,4,29,36,67,14,93,22,39,89]
h = Hash.new(0)

arr.each {|n|
h[n]+=1
(puts n; break) if h[n]==2
}

#output
#67

I hope this meets the requirements ;P

On Aug 18, 3:15 pm, "*$*"  wrote:
> How to find duplicate element (only one element is repeated) from an array
> of unsorted positive integers..
> time complexity .. O(n)
> space .. o(1).

-- 
You received this message because you are subscribed to 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] Book

2011-08-18 Thread Sanjay Rajpal
Hi friends,

Does any one of u has the book
Data Structure Puzzles: Puzzle your mind for Data Structures
by
Narasimha Karumanchi ?

Plz mail this book to me or post the link as soon as possible..

-- 
You received this message because you are subscribed to 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: Question from Google interview

2011-08-18 Thread icy`

Well no, I would think it would match "Balls"  for him, since it is
greedy --> it would try to match as much as possible that works/is in
dict.  So I have to agree with Aditya here, but I would go from the
back/right to the left. So I would first get " round",  then hopefully
" are round"  and finally "Balls are round".

Now it gets tricky if the remaining left section cannot be broken into
words.  Then we'd have to backtrack once and take the next less-greedy
match, and try again.  If that fails, take even less greedier match ,
or backtrack yet again.

On Aug 18, 1:05 pm, Dave  wrote:
> @Aditya: You probably have to be a bit more careful than that. You
> can't add the space until both the first part is a word in the
> dictionary and the rest of the string can also be broken into words in
> the dictionary. Consider "Ballsareround." Your algorithm seems to put
> a space after the second "l", but then no initial part of "sareround"
> may be in your dictionary. In that case, you have to reject that space
> and continue until you get to a division point such that both the
> first part is in the dictionary and the second part can be broken into
> words. Sounds like a good place for recursion.
>
> Dave
>
> On Aug 18, 10:52 am, aditya kumar 
> wrote:
>
>
>
>
>
>
>
> > not sure abt the algo but we can think in terms of tokeninzing . ie go for
> > greedy method . greedy looks for maximum match . extract the token and match
> > with the dictionary word . if match found then add the additional space else
> > look for next token .
> > On Thu, Aug 18, 2011 at 9:10 PM, Navneet Gupta wrote:
>
> > > Given a string containing multiple words such that spaces between words is
> > > missing. Also, you have a dictionary containing valid words.
>
> > > Ex. "Thatwouldbefantastic"
>
> > > Output a string with proper spaces inserted.
>
> > > Output - "That would be fantastic"
>
> > > The case of words like bandwidth present can be discounted.
>
> > > --
> > > Regards,
> > > Navneet
>
> > > --
> > > You received this message because you are subscribed to 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] Adobe off campus event

2011-08-18 Thread payal gupta
+1 siddharam
plzz...inform any off campus...if any1 has any idea..

Regards,
PAYAL GUPTA.

On Thu, Aug 18, 2011 at 11:27 PM, siddharam suresh
wrote:

> guys please keep updating about any off campus event
> Thank you,
> Siddharam
>
>
>
> On Thu, Aug 18, 2011 at 10:28 PM, rubal singh wrote:
>
>> Is Adobe open now for offcampus recruitment??
>>
>> Regards
>> Rubal Singh
>>
>> On Thu, Aug 18, 2011 at 5:11 PM, anon  wrote:
>> > Has anyone recently appeared for Adobe off campus event?  The profile
>> > is C/C++ programming as MTS. It is for 1 yr experienced or more
>> > candidates.
>> > Any pointers for its preparation are welcome :)
>> >
>> > --
>> > You received this message because you are subscribed to 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] Adobe off campus event

2011-08-18 Thread Rahul Tiwari
MICROSOFT is inviting off-campus recruitments..jst check MS website for
more info ..




-- 
Rahul Tiwari aka  " DONE "
B Tech Final Year
Information Technology
Motilal Nehru National Institute of Technology , Allahabad
9838339030

-- 
You received this message because you are subscribed to 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] Ebay Recruitment

2011-08-18 Thread Rahul Tiwari
@rohit singhal
off-campus or on-campus ?
if on-campus ---mention ur college plz 






-- 
Rahul Tiwari aka  " DONE "
B Tech Final Year
Information Technology
Motilal Nehru National Institute of Technology , Allahabad
9838339030

-- 
You received this message because you are subscribed to 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++ q

2011-08-18 Thread siddharth srivastava
On 19 August 2011 01:05, priya ramesh wrote:

> why isn't the size of empty class not equal to zero??
>

because its a container for other items, but does occupy space for its own
storage.

>  --
> You received this message because you are subscribed to 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.



[algogeeks] Re: MS BRAINTEASR

2011-08-18 Thread icy`
hmm... interesting logic, but what about, for example,   8 people and
3 hats.   Why can't one of the five without hats also be unsure and
try to go swimming on one of the nights?

I was thinking, if they somehow know how many hats there are (writing
numbers in the sand or other cheating methods), it would be "n choose
c" days at most, if they try a combination every night.   But this can
further be simplified to just "n" at most, if exactly one new person
goes by himself at night.

One cheating method:  one man is a leader.   The leader chooses all
men he sees with hats and says "let's go swimming at midnight".   If
that does not work, the next night the same people (but without the
leader) go swimming at midnight.   Two nights.

So... I'm thinking  n days, since the men do not know how many hats
there are.  And if cheating is allowed, 1-2 days.  Remember, the
question did say "the men cannot *tell* each other..."=P



On Aug 18, 7:15 am, DheerajSharma  wrote:
> Case 1:
> when one person is wearing hat.The person wearing hat will see that no
> other is wearing hat.hence he must be wearing it.So she will take it
> off.hence one day
> Case 2:
> when two persons are wearing,first will think..that only second one is
> wearing..while second will think only first one is wearing.hence no
> one will go on first day.
> on the second day..when both will see the same thing..they will come
> to know..that they are also wearing hat..and making the second one
> confused ;)  hence..they both will go and take off hat on second day.
> Case 3:
> first person sees hat on two others.(same for other two). no one will
> go on first day.
> On second day..same situation..bt this time the person is still
> unsure..wether she is wearing hat or not..bcoz case 2 can happen..
> on third day..when same situation arises...they will come to
> know..that they are also wearing hat..hence..they will take it off on
> day 3.
> so on..
> so on..
> For C hats...C dayz...
>
> On Aug 18, 4:06 pm, DheerajSharma  wrote:
>
>
>
>
>
>
>
> > it would take c days to take off all the hats
>
> > On Aug 18, 3:51 pm, "pg@manit"  wrote:
>
> > > A bunch of men are on an island. A genie comes down and gathers
> > > everyone together and places a magical hat on some people’s heads
> > > (i.e., at least one person has a hat). The hat is magical: it can be
> > > seen by other people, but not by the wearer of the hat himself. To
> > > remove the hat, those (and only those who have a hat) must dunk
> > > themselves underwater at exactly midnight. If there are n people and c
> > > hats, how long does it take the men to remove the hats? The men cannot
> > > tell each other (in any way) that they have a hat.
> > > FOLLOW UP
> > > Prove that your solution is correct.

-- 
You received this message because you are subscribed to 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++ q

2011-08-18 Thread priya ramesh
why isn't the size of empty class not equal to zero??

-- 
You received this message because you are subscribed to 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-08-18 Thread *$*
How to find duplicate element (only one element is repeated) from an array
of unsorted positive integers..
time complexity .. O(n)
space .. o(1).

-- 
You received this message because you are subscribed to 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] query.. amazon question

2011-08-18 Thread *$*
Sort an array of n positive integers containing n/2 sorted integers in first
and second-half?
in O(n) time complexity ..
and space complexity should be constant

-- 
You received this message because you are subscribed to 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: Answer this !!

2011-08-18 Thread siddharth srivastava
On 19 August 2011 00:31, priya ramesh wrote:

> it can remove methods defined in base class as well?? By overriding a
> virtual base class func??
>


I don't think that overriding is considered as removing the function  from
base class

>  --
> You received this message because you are subscribed to 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.



Re: [algogeeks] Re: Answer this !!

2011-08-18 Thread priya ramesh
it can remove methods defined in base class as well?? By overriding a
virtual base class func??

-- 
You received this message because you are subscribed to 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: Answer this !!

2011-08-18 Thread siddharth srivastava
2

On 19 August 2011 00:25, sarath prasath  wrote:

> 2..
>
> On Aug 18, 11:31 pm, jestincobol nair  wrote:
> > In (typical) object-oriented programming languages which one of the
> > following can be done by a subclass (derived class) of class *C*?
> >
> > 1. Remove methods defined in *C*
> > 2. Define instance variables (data members) not defined in *C*
> > 3. Remove instance variables (data members) defined in *C*
> >
> > 1
>
> --
> You received this message because you are subscribed to 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.



[algogeeks] Re: Answer this !!

2011-08-18 Thread sarath prasath
2..

On Aug 18, 11:31 pm, jestincobol nair  wrote:
> In (typical) object-oriented programming languages which one of the
> following can be done by a subclass (derived class) of class *C*?
>
> 1. Remove methods defined in *C*
> 2. Define instance variables (data members) not defined in *C*
> 3. Remove instance variables (data members) defined in *C*
>
> 1

-- 
You received this message because you are subscribed to 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: Ebay Recruitment

2011-08-18 Thread siva viknesh
first round - mixture of c cpp ques mostly with few aptitude ques...

for shortlisted people they asked simple ques like reversing LL ,
basics from c, cpp, dbms etc and simply people were
recruited..selected ppl told interview was very easy...

On Aug 18, 11:00 pm, ROHIT SINGHAL  wrote:
> ebay job location- chennai
>
>
>
>
>
>
>
>
>
> On Thu, Aug 18, 2011 at 11:28 PM, Swathi  wrote:
> > Is it ebay or paypal? Job location?
>
> > On Thu, Aug 18, 2011 at 11:26 PM, ROHIT SINGHAL  > > wrote:
>
> >> Guys i m going to appear for ebay any question set or any kinda help for
> >> the same
>
> >> --
> >> Regards:
> >> Rohit Singhal
>
> >>  --
> >> You received this message because you are subscribed to 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:
> Rohit Singhal

-- 
You received this message because you are subscribed to 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] Answer this !!

2011-08-18 Thread jestincobol nair
In (typical) object-oriented programming languages which one of the
following can be done by a subclass (derived class) of class *C*?

1. Remove methods defined in *C*
2. Define instance variables (data members) not defined in *C*
3. Remove instance variables (data members) defined in *C*

1

-- 
You received this message because you are subscribed to 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] reason

2011-08-18 Thread Arun Vishwanathan
@programming love:I can understand what u say but my doubt is that for the
first output which is 2, according to your example, p has address 10 which
it points to.And as u say int * tends to dereference 2 bytes so that wud be
now 10 and 11.finally char * takes only 1 byte so why is value at 11 address
printed( i mean 02) and not value at 10 address( 00)

similarly for the second output where u say p+1 goes from 10 to 11 due to
char type.when u do int* u say it dereferences 11 and 12. so then when char
* is done finally why does it print the one at 12 and not 11?
please correct my understanding if wrong


On Mon, Aug 15, 2011 at 10:44 AM, programming love <
love.for.programm...@gmail.com> wrote:

> The internal representation of array is this:
>
> suppose that the address starts from decimal number 10 and integer occupies
> 2 bytes
>
> 10- 0002 ( num 2 in hex)
> 12- 0003 ( num 3 in hex)
> 14- 0004 ( num 4 in hex)
>
> Now p points to address 10 and is type char. (Even after type casts) p+1
> will increment address by 1 byte (since it's char). p will now point to 11
> (int *) will say that when de-referenced 2 bytes should be extracted. So the
> 2 bytes extracted are 11, 12. Numbers in these bytes are 02 and 00
>
> 10- 00*02* ( num 2 in hex)
> 12- *00*03 ( num 3 in hex)
> 14- 0004 ( num 4 in hex)
>
> now (char *) says extract 1 byte for me. The extracted byte is 00. Hence 0
> is printed
>
> *Correct me if i am wrong.*
>
>
>  --
> You received this message because you are subscribed to 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.
>



-- 
 "People often say that motivation doesn't last. Well, neither does bathing
- that's why we recommend it daily."

-- 
You received this message because you are subscribed to 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] De shaw ques!

2011-08-18 Thread Anika Jain
hey but 935*2+69 = 1939 and when this is divided by 38 remainder iscoming to
be 1..i guess so.. is it ryt?

On Wed, Aug 17, 2011 at 9:55 PM, aditya kumar
wrote:

> i guess if the option is provided it would have been an appropiate question
> .
>
>
> On Wed, Aug 17, 2011 at 6:02 PM, Rohit Srivastava 
> wrote:
>
>> +1 to nitin
>>
>>
>> On Wed, Aug 17, 2011 at 6:02 PM, Romil ... wrote:
>>
>>> People this is not the way to approach this one. This question seems to
>>> be unfair. Take the number to be 1939 which also leaves 69 as the remainder
>>> when divided by 935 but when it is divided by 38, the remainder is only 1.
>>> There is definitely some mistake. Also there doesn't seem to be a
>>> mathematical way to solve this.
>>>
>>>
>>> On Wed, Aug 17, 2011 at 5:58 PM, priya ramesh <
>>> love.for.programm...@gmail.com> wrote:
>>>
 i solved it the same way you solved it. Took the same exmpl too :)

 --
 You received this message because you are subscribed to 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.

>>>
>>>
>>>
>>> --
>>> Romil
>>>
>>>
>>>  --
>>> You received this message because you are subscribed to 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: calculate a/b without using ‘*’, ‘/’’ and ‘%’

2011-08-18 Thread Arun Vishwanathan
@dave: in your algorithm, I have a doubt in the second loop( for loop ).
q=0 initially so the first q<<1 stays zero and then q|=1 makes q=1 now.
1 then becomes x 2 and then again with the OR 2 becomes 3.
 3 becomes 6 and with the OR 6 becomes 7.
for example if i need to do 24/3, according to the code k=3 after while loop
and then the for loop terminates with q as 7 as i mentioned the steps
above.Have i got the understanding of the code wrong?


On Thu, Aug 18, 2011 at 7:18 PM, Dave  wrote:

> @Dheeraj: What about it? It doesn't give the quotient. What is it
> supposed to do?
>
> Dave
>
> On Aug 18, 11:06 am, DheerajSharma 
> wrote:
> > wat about shifting 'a' right by floar(log2(b)) and adding 1 to it..
> >
> > On Aug 18, 8:48 pm, aditya kumar  wrote:
> >
> >
> >
> > > how abt subtracting . like a=a-b till a becomes zero . no of times
> > > subtraction is done is the answer .
> > > correct me if i am wrong !
> >
> > > On Thu, Aug 18, 2011 at 8:59 PM, Dave  wrote:
> > > > @Radha: You could simulate long division. It would look something
> like
> > > > this:
> >
> > > > int divide(int a, int b)
> > > > {
> > > >int i, k=0, q=0, s=1;
> > > > // error checking
> > > >if( b == 0 ) return 0 // return 0 for division by zero
> > > > // handle signs
> > > >if( a < 0 )
> > > >{
> > > >a = -a;
> > > >s = -1;
> > > >}
> > > >if( b < 0 )
> > > >{
> > > >b = -b;
> > > >s = -s;
> > > >}
> > > > // quick cases
> > > >if( a < b )
> > > >return 0;
> > > >if( a == b )
> > > >return s;
> > > > // shift divisor to align with dividend
> > > >while( b < a )
> > > >{
> > > >b <<= 1;
> > > >++k;
> > > >}
> > > > // perform k steps of long division in binary
> > > >for( i = 0 ; i < k ; ++i )
> > > >{
> > > >q <<= 1;
> > > >b >>= 1;
> > > >if( a > b )
> > > >{
> > > >a -= b;
> > > >q |= 1;
> > > >}
> > > >}
> > > > // apply sign to result
> > > >if( s < 0 )
> > > >q = -q;
> >
> > > >return q;
> > > > }
> >
> > > > Dave
> >
> > > > On Aug 18, 8:56 am, radha krishnan 
> > > > wrote:
> > > > > how to do using BIT manipulation ?
> >
> > > > --
> > > > You received this message because you are subscribed to 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.
>
>


-- 
 "People often say that motivation doesn't last. Well, neither does bathing
- that's why we recommend it daily."

-- 
You received this message because you are subscribed to 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] Ebay Recruitment

2011-08-18 Thread ROHIT SINGHAL
ebay job location- chennai

On Thu, Aug 18, 2011 at 11:28 PM, Swathi  wrote:

> Is it ebay or paypal? Job location?
>
> On Thu, Aug 18, 2011 at 11:26 PM, ROHIT SINGHAL  > wrote:
>
>> Guys i m going to appear for ebay any question set or any kinda help for
>> the same
>>
>> --
>> Regards:
>> Rohit Singhal
>>
>>  --
>> You received this message because you are subscribed to 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:
Rohit Singhal

-- 
You received this message because you are subscribed to 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] Ebay Recruitment

2011-08-18 Thread Swathi
Is it ebay or paypal? Job location?

On Thu, Aug 18, 2011 at 11:26 PM, ROHIT SINGHAL
wrote:

> Guys i m going to appear for ebay any question set or any kinda help for
> the same
>
> --
> Regards:
> Rohit Singhal
>
>  --
> You received this message because you are subscribed to 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] Adobe off campus event

2011-08-18 Thread siddharam suresh
guys please keep updating about any off campus event
Thank you,
Siddharam


On Thu, Aug 18, 2011 at 10:28 PM, rubal singh wrote:

> Is Adobe open now for offcampus recruitment??
>
> Regards
> Rubal Singh
>
> On Thu, Aug 18, 2011 at 5:11 PM, anon  wrote:
> > Has anyone recently appeared for Adobe off campus event?  The profile
> > is C/C++ programming as MTS. It is for 1 yr experienced or more
> > candidates.
> > Any pointers for its preparation are welcome :)
> >
> > --
> > You received this message because you are subscribed to 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] Ebay Recruitment

2011-08-18 Thread ROHIT SINGHAL
Guys i m going to appear for ebay any question set or any kinda help for the
same

-- 
Regards:
Rohit Singhal

-- 
You received this message because you are subscribed to 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: MS BRAINTEASR

2011-08-18 Thread chhabraamit
Time  taken by one man only . As a person can do only at exactly mid
night so , all have to do together only at midnight .

On Aug 18, 3:51 pm, "pg@manit"  wrote:
> A bunch of men are on an island. A genie comes down and gathers
> everyone together and places a magical hat on some people’s heads
> (i.e., at least one person has a hat). The hat is magical: it can be
> seen by other people, but not by the wearer of the hat himself. To
> remove the hat, those (and only those who have a hat) must dunk
> themselves underwater at exactly midnight. If there are n people and c
> hats, how long does it take the men to remove the hats? The men cannot
> tell each other (in any way) that they have a hat.
> FOLLOW UP
> Prove that your solution is correct.

-- 
You received this message because you are subscribed to 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: Make My Trip *URGENT*

2011-08-18 Thread Anika Jain
the level is very easy.. i dont remember the questions .. but they are
easy.. but tht makes cut off go very high

On Thu, Aug 18, 2011 at 1:22 PM, monish001  wrote:

> What level of questions for each- english, aptitute, coding? Can you
> discuss some?
>
> -Monish
>
> On Aug 17, 5:06 pm, Anika Jain  wrote:
> > there will be 15 english fill in the blanks, 5 series questn, 10 aptitude
> > questions, 10 logical questions..
> > then 10 c++ mcqs and 5 coding questions
> >
> > On Wed, Aug 17, 2011 at 5:28 PM, Brijesh Upadhyay <
> >
> >
> >
> >
> >
> >
> >
> > brijeshupadhyay...@gmail.com> wrote:
> > > has anyone given MMT written test.??  please reply , what is the
> > > pattern of the paper?
> >
> > > --
> > > You received this message because you are subscribed to 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] Oracle !!

2011-08-18 Thread jestincobol nair
how to prepare for oracle plz give suggestions ..

-- 
You received this message because you are subscribed to 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: calculate a/b without using ‘*’, ‘/’’ and ‘%’

2011-08-18 Thread Dave
@Dheeraj: What about it? It doesn't give the quotient. What is it
supposed to do?

Dave

On Aug 18, 11:06 am, DheerajSharma 
wrote:
> wat about shifting 'a' right by floar(log2(b)) and adding 1 to it..
>
> On Aug 18, 8:48 pm, aditya kumar  wrote:
>
>
>
> > how abt subtracting . like a=a-b till a becomes zero . no of times
> > subtraction is done is the answer .
> > correct me if i am wrong !
>
> > On Thu, Aug 18, 2011 at 8:59 PM, Dave  wrote:
> > > @Radha: You could simulate long division. It would look something like
> > > this:
>
> > > int divide(int a, int b)
> > > {
> > >    int i, k=0, q=0, s=1;
> > > // error checking
> > >    if( b == 0 ) return 0 // return 0 for division by zero
> > > // handle signs
> > >    if( a < 0 )
> > >    {
> > >        a = -a;
> > >        s = -1;
> > >    }
> > >    if( b < 0 )
> > >    {
> > >        b = -b;
> > >        s = -s;
> > >    }
> > > // quick cases
> > >    if( a < b )
> > >        return 0;
> > >    if( a == b )
> > >        return s;
> > > // shift divisor to align with dividend
> > >    while( b < a )
> > >    {
> > >        b <<= 1;
> > >        ++k;
> > >    }
> > > // perform k steps of long division in binary
> > >    for( i = 0 ; i < k ; ++i )
> > >    {
> > >        q <<= 1;
> > >        b >>= 1;
> > >        if( a > b )
> > >        {
> > >            a -= b;
> > >            q |= 1;
> > >        }
> > >    }
> > > // apply sign to result
> > >    if( s < 0 )
> > >        q = -q;
>
> > >    return q;
> > > }
>
> > > Dave
>
> > > On Aug 18, 8:56 am, radha krishnan 
> > > wrote:
> > > > how to do using BIT manipulation ?
>
> > > --
> > > You received this message because you are subscribed to 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: calculate a/b without using ‘*’, ‘/’’ and ‘%’

2011-08-18 Thread Dave
@Aditya: Not wrong, but inefficient and inelegant. Repeated
subtraction has complexity O(quotient), while long division has
complexity O(log quotient).

Dave

On Aug 18, 10:48 am, aditya kumar 
wrote:
> how abt subtracting . like a=a-b till a becomes zero . no of times
> subtraction is done is the answer .
> correct me if i am wrong !
>
>
>
> On Thu, Aug 18, 2011 at 8:59 PM, Dave  wrote:
> > @Radha: You could simulate long division. It would look something like
> > this:
>
> > int divide(int a, int b)
> > {
> >    int i, k=0, q=0, s=1;
> > // error checking
> >    if( b == 0 ) return 0 // return 0 for division by zero
> > // handle signs
> >    if( a < 0 )
> >    {
> >        a = -a;
> >        s = -1;
> >    }
> >    if( b < 0 )
> >    {
> >        b = -b;
> >        s = -s;
> >    }
> > // quick cases
> >    if( a < b )
> >        return 0;
> >    if( a == b )
> >        return s;
> > // shift divisor to align with dividend
> >    while( b < a )
> >    {
> >        b <<= 1;
> >        ++k;
> >    }
> > // perform k steps of long division in binary
> >    for( i = 0 ; i < k ; ++i )
> >    {
> >        q <<= 1;
> >        b >>= 1;
> >        if( a > b )
> >        {
> >            a -= b;
> >            q |= 1;
> >        }
> >    }
> > // apply sign to result
> >    if( s < 0 )
> >        q = -q;
>
> >    return q;
> > }
>
> > Dave
>
> > On Aug 18, 8:56 am, radha krishnan 
> > wrote:
> > > how to do using BIT manipulation ?
>
> > --
> > You received this message because you are subscribed to 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: Urgent...plz help

2011-08-18 Thread Dave
@Ankur: When k = 100, the heap method I proposed is O(n). And if you
have to program it from scratch, it is a lot easier than the median of
medians algorithm.

Dave

On Aug 18, 2:35 am, Ankur Garg  wrote:
> U can use selection Algorithm to achieve the same ...it has got expected
> running time complexity as O(n) ...Read Wikipedia to see the proper
> implementation..
>
> Just some tweak with Quick Sort ..Also there is one method median of medians
> one which has worst case complexity as O(n)
>
> Regards
>
> Ankur
>
> On Wed, Aug 17, 2011 at 11:47 PM, Amol Sharma wrote:
>
>
>
> > it will be max heap only.in which root denotes the largest number in
> > your set of 100 smallest
> > --
>
> > Amol Sharma
> > Third Year Student
> > Computer Science and Engineering
> > MNNIT Allahabad
>
> > On Thu, Aug 18, 2011 at 9:14 AM, aditi garg 
> > wrote:
>
> >> @ dave : i hv one doubt,we wud be maintaining a max or a min heap??
>
> >> On Thu, Aug 18, 2011 at 9:11 AM, aditi garg 
> >> wrote:
>
> >>> thank u so much dave :)
>
> >>> On Thu, Aug 18, 2011 at 8:44 AM, Dave  wrote:
>
>  @Aditi: Form a max-heap of the first 100 numbers. Then as you read the
>  remaining numbers, if a number is less than the root of the max-heap,
>  replace the root with it and restore the heap condition. When you
>  reach the end of the million numbers, the heap will contain the
>  smallest 100 numbers.
>
>  If there are n numbers and you want the smallest k, this algorithm is
>  O(n log k).
>
>  Dave
>
>  On Aug 17, 10:05 pm, aditi garg  wrote:
>  > How to find the set of smallest 100 numbers out of 1 million
>  numbers...
>
>  --
>  You received this message because you are subscribed to 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
>
> >> --
> >> 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.

-- 
You received this message because you are subscribed to 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: Urgent...plz help

2011-08-18 Thread Dave
@XYZ: There are up to n numbers to put into the heap, and an insertion
into a heap of size k is O(log k).

Dave

On Aug 17, 10:42 pm, XYZ  wrote:
> @Dave
>
> How did you get the complexity as O(n log k)
>
> On Aug 18, 8:14 am, Dave  wrote:
>
>
>
> > @Aditi: Form a max-heap of the first 100 numbers. Then as you read the
> > remaining numbers, if a number is less than the root of the max-heap,
> > replace the root with it and restore the heap condition. When you
> > reach the end of the million numbers, the heap will contain the
> > smallest 100 numbers.
>
> > If there are n numbers and you want the smallest k, this algorithm is
> > O(n log k).
>
> > Dave
>
> > On Aug 17, 10:05 pm, aditi garg  wrote:
>
> > > How to find the set of smallest 100 numbers out of 1 million numbers...

-- 
You received this message because you are subscribed to 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: Question from Google interview

2011-08-18 Thread Dave
@Aditya: You probably have to be a bit more careful than that. You
can't add the space until both the first part is a word in the
dictionary and the rest of the string can also be broken into words in
the dictionary. Consider "Ballsareround." Your algorithm seems to put
a space after the second "l", but then no initial part of "sareround"
may be in your dictionary. In that case, you have to reject that space
and continue until you get to a division point such that both the
first part is in the dictionary and the second part can be broken into
words. Sounds like a good place for recursion.

Dave

On Aug 18, 10:52 am, aditya kumar 
wrote:
> not sure abt the algo but we can think in terms of tokeninzing . ie go for
> greedy method . greedy looks for maximum match . extract the token and match
> with the dictionary word . if match found then add the additional space else
> look for next token .
> On Thu, Aug 18, 2011 at 9:10 PM, Navneet Gupta wrote:
>
>
>
> > Given a string containing multiple words such that spaces between words is
> > missing. Also, you have a dictionary containing valid words.
>
> > Ex. "Thatwouldbefantastic"
>
> > Output a string with proper spaces inserted.
>
> > Output - "That would be fantastic"
>
> > The case of words like bandwidth present can be discounted.
>
> > --
> > Regards,
> > Navneet
>
> > --
> > You received this message because you are subscribed to 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 Question

2011-08-18 Thread siddharam suresh
use (dynamic/ infinite)array initial the array with -1.
insert(int a)
{
array[a]=a;
}
delete(int a)
{
array[a]=-1;
}
..
Thank you,
Siddharam


On Thu, Aug 18, 2011 at 7:54 PM, DheerajSharma
wrote:

> bitset would work i guess
>
> On Aug 18, 7:10 pm, hary rathor  wrote:
> > bitset is best . require only 32 time less then require in hash table .
>
> --
> You received this message because you are subscribed to 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: Urgent...plz help

2011-08-18 Thread PramodP
When the interviewer says there are a million numbers to consider, it might
mean that we don't have enough memory to hold all those in a single
datastructure. In which case Dave's solution of using a heap of size 100 is
the better one I suppose. I am sure a B+ tree takes O(nlogn to the base b)
 while a heap takes only O(nlogk) and k Create a B+ tree and extract the first 100 leaf nodes
>
> On Thu, Aug 18, 2011 at 1:05 PM, Ankur Garg  wrote:
>
>> U can use selection Algorithm to achieve the same ...it has got expected
>> running time complexity as O(n) ...Read Wikipedia to see the proper
>> implementation..
>>
>> Just some tweak with Quick Sort ..Also there is one method median of
>> medians one which has worst case complexity as O(n)
>>
>> Regards
>>
>> Ankur
>>
>>
>> On Wed, Aug 17, 2011 at 11:47 PM, Amol Sharma wrote:
>>
>>> it will be max heap only.in which root denotes the largest number in
>>> your set of 100 smallest
>>> --
>>>
>>>
>>> Amol Sharma
>>> Third Year Student
>>> Computer Science and Engineering
>>> MNNIT Allahabad
>>>
>>>
>>>
>>>
>>> On Thu, Aug 18, 2011 at 9:14 AM, aditi garg 
>>> wrote:
>>>
 @ dave : i hv one doubt,we wud be maintaining a max or a min heap??


 On Thu, Aug 18, 2011 at 9:11 AM, aditi garg 
 wrote:

> thank u so much dave :)
>
>
> On Thu, Aug 18, 2011 at 8:44 AM, Dave  wrote:
>
>> @Aditi: Form a max-heap of the first 100 numbers. Then as you read the
>> remaining numbers, if a number is less than the root of the max-heap,
>> replace the root with it and restore the heap condition. When you
>> reach the end of the million numbers, the heap will contain the
>> smallest 100 numbers.
>>
>> If there are n numbers and you want the smallest k, this algorithm is
>> O(n log k).
>>
>> Dave
>>
>> On Aug 17, 10:05 pm, aditi garg  wrote:
>> > How to find the set of smallest 100 numbers out of 1 million
>> numbers...
>>
>> --
>> You received this message because you are subscribed to 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
>
>
>


 --
 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.
>>>
>>
>>  --
>> You received this message because you are subscribed to 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
>
> Apoorve Mohan
>
>  --
> You received this message because you are subscribed to 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: Any body have idea about samsung india recruitment...

2011-08-18 Thread Abhishek gupta
search the group

-- 
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/-/-uBb8iSPXTQJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from 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] Adobe off campus event

2011-08-18 Thread rubal singh
Is Adobe open now for offcampus recruitment??

Regards
Rubal Singh

On Thu, Aug 18, 2011 at 5:11 PM, anon  wrote:
> Has anyone recently appeared for Adobe off campus event?  The profile
> is C/C++ programming as MTS. It is for 1 yr experienced or more
> candidates.
> Any pointers for its preparation are welcome :)
>
> --
> You received this message because you are subscribed to 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: calculate a/b without using ‘*’, ‘/’’ and ‘%’

2011-08-18 Thread DheerajSharma
wat about shifting 'a' right by floar(log2(b)) and adding 1 to it..

On Aug 18, 8:48 pm, aditya kumar  wrote:
> how abt subtracting . like a=a-b till a becomes zero . no of times
> subtraction is done is the answer .
> correct me if i am wrong !
>
>
>
>
>
>
>
> On Thu, Aug 18, 2011 at 8:59 PM, Dave  wrote:
> > @Radha: You could simulate long division. It would look something like
> > this:
>
> > int divide(int a, int b)
> > {
> >    int i, k=0, q=0, s=1;
> > // error checking
> >    if( b == 0 ) return 0 // return 0 for division by zero
> > // handle signs
> >    if( a < 0 )
> >    {
> >        a = -a;
> >        s = -1;
> >    }
> >    if( b < 0 )
> >    {
> >        b = -b;
> >        s = -s;
> >    }
> > // quick cases
> >    if( a < b )
> >        return 0;
> >    if( a == b )
> >        return s;
> > // shift divisor to align with dividend
> >    while( b < a )
> >    {
> >        b <<= 1;
> >        ++k;
> >    }
> > // perform k steps of long division in binary
> >    for( i = 0 ; i < k ; ++i )
> >    {
> >        q <<= 1;
> >        b >>= 1;
> >        if( a > b )
> >        {
> >            a -= b;
> >            q |= 1;
> >        }
> >    }
> > // apply sign to result
> >    if( s < 0 )
> >        q = -q;
>
> >    return q;
> > }
>
> > Dave
>
> > On Aug 18, 8:56 am, radha krishnan 
> > wrote:
> > > how to do using BIT manipulation ?
>
> > --
> > You received this message because you are subscribed to 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] Question from Google interview

2011-08-18 Thread aditya kumar
not sure abt the algo but we can think in terms of tokeninzing . ie go for
greedy method . greedy looks for maximum match . extract the token and match
with the dictionary word . if match found then add the additional space else
look for next token .
On Thu, Aug 18, 2011 at 9:10 PM, Navneet Gupta wrote:

> Given a string containing multiple words such that spaces between words is
> missing. Also, you have a dictionary containing valid words.
>
> Ex. "Thatwouldbefantastic"
>
> Output a string with proper spaces inserted.
>
> Output - "That would be fantastic"
>
> The case of words like bandwidth present can be discounted.
>
> --
> Regards,
> Navneet
>
>
> --
> You received this message because you are subscribed to 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: calculate a/b without using ‘*’, ‘/’’ and ‘%’

2011-08-18 Thread aditya kumar
how abt subtracting . like a=a-b till a becomes zero . no of times
subtraction is done is the answer .
correct me if i am wrong !

On Thu, Aug 18, 2011 at 8:59 PM, Dave  wrote:

> @Radha: You could simulate long division. It would look something like
> this:
>
> int divide(int a, int b)
> {
>int i, k=0, q=0, s=1;
> // error checking
>if( b == 0 ) return 0 // return 0 for division by zero
> // handle signs
>if( a < 0 )
>{
>a = -a;
>s = -1;
>}
>if( b < 0 )
>{
>b = -b;
>s = -s;
>}
> // quick cases
>if( a < b )
>return 0;
>if( a == b )
>return s;
> // shift divisor to align with dividend
>while( b < a )
>{
>b <<= 1;
>++k;
>}
> // perform k steps of long division in binary
>for( i = 0 ; i < k ; ++i )
>{
>q <<= 1;
>b >>= 1;
>if( a > b )
>{
>a -= b;
>q |= 1;
>}
>}
> // apply sign to result
>if( s < 0 )
>q = -q;
>
>return q;
> }
>
> Dave
>
> On Aug 18, 8:56 am, radha krishnan 
> wrote:
> > how to do using BIT manipulation ?
>
> --
> You received this message because you are subscribed to 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] Question from Google interview

2011-08-18 Thread Navneet Gupta
Given a string containing multiple words such that spaces between words is
missing. Also, you have a dictionary containing valid words.

Ex. "Thatwouldbefantastic"

Output a string with proper spaces inserted.

Output - "That would be fantastic"

The case of words like bandwidth present can be discounted.

-- 
Regards,
Navneet

-- 
You received this message because you are subscribed to 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: calculate a/b without using ‘*’, ‘/’’ and ‘%’

2011-08-18 Thread Dave
@Radha: You could simulate long division. It would look something like
this:

int divide(int a, int b)
{
int i, k=0, q=0, s=1;
// error checking
if( b == 0 ) return 0 // return 0 for division by zero
// handle signs
if( a < 0 )
{
a = -a;
s = -1;
}
if( b < 0 )
{
b = -b;
s = -s;
}
// quick cases
if( a < b )
return 0;
if( a == b )
return s;
// shift divisor to align with dividend
while( b < a )
{
b <<= 1;
++k;
}
// perform k steps of long division in binary
for( i = 0 ; i < k ; ++i )
{
q <<= 1;
b >>= 1;
if( a > b )
{
a -= b;
q |= 1;
}
}
// apply sign to result
if( s < 0 )
q = -q;

return q;
}

Dave

On Aug 18, 8:56 am, radha krishnan 
wrote:
> how to do using BIT manipulation ?

-- 
You received this message because you are subscribed to 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: calculate a/b without using ‘*’, ‘/’’ and ‘%’

2011-08-18 Thread Dave
@Don: Try it with a = b = -1.

Dave

On Aug 18, 9:45 am, Don  wrote:
> exp(ln(a)-ln(b))
>
> On Aug 18, 8:56 am, radha krishnan 
> wrote:
>
>
>
> > how to do using BIT manipulation ?

-- 
You received this message because you are subscribed to 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] atrenta paper

2011-08-18 Thread deepikaanand
plz sm1 from NSIT upload Arenta qs paper

-- 
You received this message because you are subscribed to 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: calculate a/b without using ‘*’, ‘/’’ and ‘%’

2011-08-18 Thread Don
exp(ln(a)-ln(b))

On Aug 18, 8:56 am, radha krishnan 
wrote:
> how to do using BIT manipulation ?

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: longest repeated substring

2011-08-18 Thread Arun Vishwanathan
am just asking but how can u get all possible substrings in O(n square) time
when there are 2 power N of them actually?


On Thu, Aug 18, 2011 at 4:20 PM, DheerajSharma
wrote:

> O(n^2) i guess..
> We can save all possible substrings..(in two loops it can be done) in
> a hash map..as key..and the value as COUNT..then we can..search for
> the most occurring substring!!
>  u said for non - efficient ;)
>
> On Aug 18, 6:07 pm, MAC  wrote:
> > A string can have many sub-strings inside it . find the longest substring
> > which is repeated maximum number of times. in case of 2 options repeated
> > same number of times , largest one needs to be ouput and in case same
> length
> > and same number of times repeated , anyone can be outputted.
> >
> > abcdefcbcdfbcdefef  has bcd and ef repeated multiple times but bcd count
> >
> > trie apraoch is fine , but in interview difficult to code ,.so definately
> > some other solution is requested . please also give non-efficient , but
> easy
> > to code solution if any
> > --
> > thanks
> > --mac
>
> --
> You received this message because you are subscribed to 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.
>
>


-- 
 "People often say that motivation doesn't last. Well, neither does bathing
- that's why we recommend it daily."

-- 
You received this message because you are subscribed to 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: longest repeated substring

2011-08-18 Thread DheerajSharma
suffix tree is obvsly best..but hard to code at interview!!

On Aug 18, 7:20 pm, DheerajSharma  wrote:
> O(n^2) i guess..
> We can save all possible substrings..(in two loops it can be done) in
> a hash map..as key..and the value as COUNT..then we can..search for
> the most occurring substring!!
>  u said for non - efficient ;)
>
> On Aug 18, 6:07 pm, MAC  wrote:
>
>
>
>
>
>
>
> > A string can have many sub-strings inside it . find the longest substring
> > which is repeated maximum number of times. in case of 2 options repeated
> > same number of times , largest one needs to be ouput and in case same length
> > and same number of times repeated , anyone can be outputted.
>
> > abcdefcbcdfbcdefef  has bcd and ef repeated multiple times but bcd count
>
> > trie apraoch is fine , but in interview difficult to code ,.so definately
> > some other solution is requested . please also give non-efficient , but easy
> > to code solution if any
> > --
> > thanks
> > --mac

-- 
You received this message because you are subscribed to 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: Amazon Question

2011-08-18 Thread DheerajSharma
bitset would work i guess

On Aug 18, 7:10 pm, hary rathor  wrote:
> bitset is best . require only 32 time less then require in hash table .

-- 
You received this message because you are subscribed to 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: longest repeated substring

2011-08-18 Thread DheerajSharma
O(n^2) i guess..
We can save all possible substrings..(in two loops it can be done) in
a hash map..as key..and the value as COUNT..then we can..search for
the most occurring substring!!
 u said for non - efficient ;)

On Aug 18, 6:07 pm, MAC  wrote:
> A string can have many sub-strings inside it . find the longest substring
> which is repeated maximum number of times. in case of 2 options repeated
> same number of times , largest one needs to be ouput and in case same length
> and same number of times repeated , anyone can be outputted.
>
> abcdefcbcdfbcdefef  has bcd and ef repeated multiple times but bcd count
>
> trie apraoch is fine , but in interview difficult to code ,.so definately
> some other solution is requested . please also give non-efficient , but easy
> to code solution if any
> --
> thanks
> --mac

-- 
You received this message because you are subscribed to 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: knight's tour - variant

2011-08-18 Thread Don
1.0. A knight's only legal move is to remain on the board.

On Aug 17, 10:27 am, Seshumadhav Chaturvedula 
wrote:
> what is the probability that a knight will stay on a K X K chess board after
> 'n' steps ?

-- 
You received this message because you are subscribed to 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 Question

2011-08-18 Thread hary rathor
bitset is best . require only 32 time less then require in hash table .

-- 
You received this message because you are subscribed to 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: Need to Hire an algorithm expert for a one time assignment

2011-08-18 Thread Don
Why not post your questions, one per thread, and let people discuss
it?
Don

On Aug 18, 7:41 am, maxpayne  wrote:
> Hi,
>
> I need help from some one who is really good at algorithms to finish
> an assignment. I am a freelancer (not a student, so don't expect
> homework problems) based in Singapore and unfortunately I do not have
> a back ground in algorithms. I will really appreciate it if some one
> in this group can spare an hour or so to give me some expert advice.
> The problems will be more along the lines of those asked in popular
> coding competitions (think TopCoder, ACM, Project Euler etc). Kindly
> write back to me at aquarian.thun...@gmail.com (for details)  if you
> are interested and can spare an hour or so.
>
> thanks,
> Max

-- 
You received this message because you are subscribed to 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] longest repeated substring

2011-08-18 Thread hary rathor
suffix tree is best

-- 
You received this message because you are subscribed to 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 repeated substring

2011-08-18 Thread MAC
A string can have many sub-strings inside it . find the longest substring
which is repeated maximum number of times. in case of 2 options repeated
same number of times , largest one needs to be ouput and in case same length
and same number of times repeated , anyone can be outputted.

abcdefcbcdfbcdefef  has bcd and ef repeated multiple times but bcd count

trie apraoch is fine , but in interview difficult to code ,.so definately
some other solution is requested . please also give non-efficient , but easy
to code solution if any
-- 
thanks
--mac

-- 
You received this message because you are subscribed to 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: Possible solutions to these sort of Questions

2011-08-18 Thread Kunal Patil
+1 Yasir.

On Wed, Aug 17, 2011 at 11:39 PM, Yasir  wrote:

> For questions specifically asking about test cases, I would suggest
> following 3 step approach:
>
> First think of a* basic flow that MUST work for the application* (what is
> expected with the application. Firstly make it clear with you interviewer).
>  eg:
>  1) User should be able to open Notepad without any error/warning.
>  2) User should be seamlessly able to type characters. (should not be
> the case, where you are typing and it appears after some time)
>  3) Create one file using notepad, close the application and reopen the
> file. (make sure, result is as expected)
>  ..and so on (try to cover all basic functionality). Also you can
> club few test cases. eg, for menu features you can say something like:
> verify that all menu options are working as expected.
>
>
> Now move one step ahead, and *think of a person who is not familiar with
> the application* (what would he do?):
>   eg:
>1) User should be able open the Help docs and help docs should be
> relevant.
>2) If a user writes something, forgets to save and trying to close
> the application: Appropriate notification.
>3) Trying to copy and paste with supported/unsupported format.
>4) Drag/drop a file on the application.
> and so on...
>
> and then comes *negative test cases* (it may happen rarely but it is very
> important):
>   eg:
>   1) Trying to open multiple instances of the application
> (application shouldn't act weird)
>   2) Crash the application and open it next time. It should open (may
> be with some notification), but the application SHOULDN'T CORRUPT.
>   3) Application behavior when you open very large file. (should give
> appropriate warning, if it is going to take longer time/crash)
>   4) behavior with unsupported file.  (eg: trying to open a .out file)
>  ..and so on...
>
> In my opinion, with this approach you will be able to write good test
> cases. Just think on the line above mentioned 3 steps.
> You may come with different test cases, but your test cases will also
> ensure that application is working fine in most of the cases. :)
>
>
> Any suggestions on above approach?
>
> --
> 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/-/POcIPzZSlbYJ.
>
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from 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 to Hire an algorithm expert for a one time assignment

2011-08-18 Thread maxpayne
Hi,

I need help from some one who is really good at algorithms to finish
an assignment. I am a freelancer (not a student, so don't expect
homework problems) based in Singapore and unfortunately I do not have
a back ground in algorithms. I will really appreciate it if some one
in this group can spare an hour or so to give me some expert advice.
The problems will be more along the lines of those asked in popular
coding competitions (think TopCoder, ACM, Project Euler etc). Kindly
write back to me at aquarian.thun...@gmail.com (for details)  if you
are interested and can spare an hour or so.

thanks,
Max

-- 
You received this message because you are subscribed to 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: Amazon Interview Q

2011-08-18 Thread WgpShashank
Hi Piyuesh Same Question i Faced Some Times Ago, Have a look at algo/code  & 
let me know if any test case missed ?

http://shashank7s.blogspot.com/2011/05/wap-to-detect-loop-in-doubly-linked.html 


if we wants to remove loop from DLL, we can do in the same way we used to do 
for singly linked list while taking care of test cases.

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/-/MsPCoJLD2hYJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from 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 Question

2011-08-18 Thread sagar pareek
Common yaar its very simple
it is good for u to go in deep hence google it or refer a good data
structure book

On Thu, Aug 18, 2011 at 5:36 PM, Ankur Garg  wrote:

> Can u provide a bit detail bro !!
>
>
> On Thu, Aug 18, 2011 at 8:04 AM, sagar pareek wrote:
>
>> Hashing
>> :)
>>
>> On Thu, Aug 18, 2011 at 5:30 PM, Ankur Garg  wrote:
>>
>>> Define a data structure , using extra memory/space , such that :
>>>
>>> Insert(int a)
>>> Delete(int a)
>>> isPresent(int a)
>>> get(int a)
>>>
>>> All above operations on the defined data structure take O(1) , i.e.
>>> constant time.
>>>
>>>
>>> Any suggestions /solutions for this problem
>>>
>>>
>>> Regards
>>>
>>> Ankur
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>
>>
>> --
>> **Regards
>> SAGAR PAREEK
>> COMPUTER SCIENCE AND ENGINEERING
>> NIT ALLAHABAD
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



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



Re: [algogeeks] Amazon Question

2011-08-18 Thread Anantha Krishnan
Refer here .

On Thu, Aug 18, 2011 at 5:36 PM, Ankur Garg  wrote:

> Can u provide a bit detail bro !!
>
>
> On Thu, Aug 18, 2011 at 8:04 AM, sagar pareek wrote:
>
>> Hashing
>> :)
>>
>> On Thu, Aug 18, 2011 at 5:30 PM, Ankur Garg  wrote:
>>
>>> Define a data structure , using extra memory/space , such that :
>>>
>>> Insert(int a)
>>> Delete(int a)
>>> isPresent(int a)
>>> get(int a)
>>>
>>> All above operations on the defined data structure take O(1) , i.e.
>>> constant time.
>>>
>>>
>>> Any suggestions /solutions for this problem
>>>
>>>
>>> Regards
>>>
>>> Ankur
>>>
>>> --
>>> You received this message because you are subscribed to 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.



[algogeeks] Re: |a-b| + |b-c| + |c-a|

2011-08-18 Thread WgpShashank
Hey Mac, Coded it Sometimes back , Have a  Look(i know its naive way :D) so 
let me know if anything wrong , we can use Min-Heap to make solution 
efficient isn't it ?

http://shashank7s.blogspot.com/2011/06/given-3-arrays-pick-3-nos-one-from-each.html


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/-/Vg0eaFio8w8J.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from 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 Question

2011-08-18 Thread Anantha Krishnan
We can use hash to do all the operations in O(1) time.

Thanks & Regards,
Anantha Krishnan

On Thu, Aug 18, 2011 at 5:30 PM, Ankur Garg  wrote:

> Define a data structure , using extra memory/space , such that :
>
> Insert(int a)
> Delete(int a)
> isPresent(int a)
> get(int a)
>
> All above operations on the defined data structure take O(1) , i.e.
> constant time.
>
>
> Any suggestions /solutions for this problem
>
>
> Regards
>
> Ankur
>
> --
> You received this message because you are subscribed to 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] Amazon Question

2011-08-18 Thread Ankur Garg
Can u provide a bit detail bro !!

On Thu, Aug 18, 2011 at 8:04 AM, sagar pareek  wrote:

> Hashing
> :)
>
> On Thu, Aug 18, 2011 at 5:30 PM, Ankur Garg  wrote:
>
>> Define a data structure , using extra memory/space , such that :
>>
>> Insert(int a)
>> Delete(int a)
>> isPresent(int a)
>> get(int a)
>>
>> All above operations on the defined data structure take O(1) , i.e.
>> constant time.
>>
>>
>> Any suggestions /solutions for this problem
>>
>>
>> Regards
>>
>> Ankur
>>
>> --
>> You received this message because you are subscribed to 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] Amazon Question

2011-08-18 Thread sagar pareek
Hashing
:)

On Thu, Aug 18, 2011 at 5:30 PM, Ankur Garg  wrote:

> Define a data structure , using extra memory/space , such that :
>
> Insert(int a)
> Delete(int a)
> isPresent(int a)
> get(int a)
>
> All above operations on the defined data structure take O(1) , i.e.
> constant time.
>
>
> Any suggestions /solutions for this problem
>
>
> Regards
>
> Ankur
>
> --
> You received this message because you are subscribed to 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.



[algogeeks] Amazon Question

2011-08-18 Thread Ankur Garg
Define a data structure , using extra memory/space , such that :

Insert(int a)
Delete(int a)
isPresent(int a)
get(int a)

All above operations on the defined data structure take O(1) , i.e. constant
time.


Any suggestions /solutions for this problem


Regards

Ankur

-- 
You received this message because you are subscribed to 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: Any body have idea about samsung india recruitment...

2011-08-18 Thread Ankit singh
thanks
*Ankit Singh

*



On Thu, Aug 18, 2011 at 4:51 PM, DheerajSharma
wrote:

> samsung SISO would be coming day after tomm. in our collg..would tell
> u the details..howevel..samsung SEL visited..our collg few
> dayz..back..there was first an aptitude paper..having logical
> reasoning and pie chart type questions..that were very very easy..and
> the question booklet they provided.. are common ..so few ans were
> marked 4 me :)
>
> then there was one technical paper which was also easy..bt i didnt
> gave..i dont know..much abt it..bt it was related to c and os..and was
> easy..
>
> On Aug 18, 4:02 pm, Ankit singh  wrote:
> > hi, is there any1 who appeared for samsung india,i want to know what type
> of
> > questions asked in the written test and interview.and please also tell
> that
> > what was the eligibility criteria for written test.the company will be
> > coming on 24 in our college.
> > friends please reply...
> > Ankit Singh
> > IIITM,GWALIOR
> > **
>
> --
> You received this message because you are subscribed to 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.



  1   2   >