[algogeeks] Re: Find all longest increasing subsequence of length k

2012-01-29 Thread Manee
store all the indices wherever the value decreases. all subsequences
between 0, these indices and the end index n are increasing
subsequences.

Check which of these are of length K.



On Jan 26, 11:17 pm, atul anand atul.87fri...@gmail.com wrote:
 Hi,

 suggest an algo which will find all longest increasing sub
 sequence of length K.

 for eg:-
 input : 7 8 9 4 10 11
 K=3

 output :
 7 8 9
 7 9 10
 7 10 11
 8 9 10
 8 10 11

 desired complexity : O(k*n*logn)

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

2011-08-05 Thread Manee
ADOBE asks the very basic C/C++ questions

one of their toughest however was :

every number ending in 3 has a multiple of the form 111...111

e.g 3 has 111
 13 has 11
so on..

find the algo for finding the number for an input number ending in 3.

On Aug 5, 2:33 pm, Agyat jalsa.n.sa...@gmail.com wrote:
 hey, guys adobe is visiting our campus. So those who know questions
 that adobe asked in written or interview, please post here as it will
 be of great help (as adobe has visited some colleges already).
 Thank you in advance.

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