[algogeeks] Re: Longest Increasing Subsequence in O(nlogn)

2010-05-28 Thread amit
Hi , I am looking for a Longest Increasing Subsequence Algorithm in O(nlogn) time. i.e given an array of integers we have to find the longest subsequence of it that is always increasing e.g [3,5,2,7,12,1] ---> Ans[3,5,7,12] On May 28, 9:19 pm, Anand wrote: > Hi Amit, > > Could you just elaborat

Re: [algogeeks] Longest Increasing Subsequence in O(nlogn)

2010-05-28 Thread Amit Jaspal
I suppose the heading of the mail makes it clear , if its not i m takin about Longest Increasing Subsequence in O(nlogn) On Fri, May 28, 2010 at 9:49 PM, Anand wrote: > Hi Amit, > > Could you just elaborate which algorithm are you talking about. Is it KMP > algorithm for string matching are look

[algogeeks] Re: Google telephone interview question

2010-05-28 Thread Atul Kumar
Sorry the example should be file1 = sec2 -> sec7->sec9 -> sec11 -> null file2 = sec10 -> sec12-> null as first sector contains the file information. google don't hear DFS or linear parsing, give me the code ;) On May 27, 11:28 am, Atul Kumar wrote: > There is a file system on the disc. the dis

Re: [algogeeks] Longest Increasing Subsequence in O(nlogn)

2010-05-28 Thread Anand
Hi Amit, Could you just elaborate which algorithm are you talking about. Is it KMP algorithm for string matching are looking at. Thanks, Anand On Fri, May 28, 2010 at 8:14 AM, amit wrote: > Hi , Can anyone plz explain this algorithm taking some example. > I read this on wiki but could'nt get h

Re: [algogeeks] Google telephone interview question

2010-05-28 Thread Anand
DFS will do the same. and form a list. Thanks, Anand On Thu, May 27, 2010 at 9:35 PM, Sathaiah Dontula wrote: > How about doing like below ?. > > Go by sector by sector and check the links of it, it has the link check the > next and form the list, you will get the links like below and construct

[algogeeks] Longest Increasing Subsequence in O(nlogn)

2010-05-28 Thread amit
Hi , Can anyone plz explain this algorithm taking some example. I read this on wiki but could'nt get how binary search was working. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.co

Re: [algogeeks] Google telephone interview question

2010-05-28 Thread Sathaiah Dontula
How about doing like below ?. Go by sector by sector and check the links of it, it has the link check the next and form the list, you will get the links like below and construct the sector 1 from it and link, 1. sec7->sec9 -> sec11 -> null, 2. sec12-> null Thanks, Sathaiah On Fri, May 28, 20

Re: [algogeeks] Google telephone interview question

2010-05-28 Thread Anand
The answer would be to run DFS over all the sectors of the Disk. By running the DFS over all sectors we would know which all sectors are connected to each other and could easily restore the first sector information. Thanks, Anand On Thu, May 27, 2010 at 11:28 AM, Atul Kumar wrote: > There is a f