C# .NET - longest decreasing subsequence of array
Asked By kshama parashar
04-Feb-12 02:16 AM
hello to all
i want to find longest decreasing subsequence of array
int [] arr={5,8,4,3,2,10,9,7,5,3,12,2}
in C# how to do this help me
D Company replied to kshama parashar
hello friend.
there are some algorithms, available. perform this.one i have found here, see if it is helpful.
http://www.ams.org/samplings/feature-column/fcarc-longest-subsequence
regards
D
searching for the longest subsequence of ones SQL Server Hi. The puzzle is already solved but I feel it can PEARLS books. I vaguely remember he had a recursive solution that used a one dimensional array, and not a table. Having said all that, let's build a table to mimic Understand where I'm coming from?:) www.beyondsql.blogspot.com keywords: searching, for, the, longest, subsequence, of, ones description: Hi. The puzzle is already solved but I feel it can be
of the same file) I have tried out some approaches like finding the Longets Common Subsequence between them Also tried to implement the Algorithm found at http: / / delivery.acm.org / 10 better alorithm Thanks in advance Srikanth Project Developer Discussions Project 2007 (1) Project 95 (1) Subsequence (1) Srikanth (1) Longets (1) Diff (1) Alorithm (1) CFTOKEN (1) In article <D22B8D8C-3CEC version of Project (Project 95 through Project 2007). I'm not familiar with Longets Common Subsequence so I can't comment on whether it's applicability to Project files is useful as a reference 5. Step through both index register arrays. If an element of each array is equal (i.e. that Unique ID appears in both files), then store a data array of fields to be compared 6. If the index registers do not agree, set up a difference array for use later to annotate either an added line (later file) or deleted line (original file). 7. When the field cell data array from the later file is all gathered, compare those values with the same fields of differences exist (i.e. field cell changes), store those field cell locations in a changed array. (Yeah, I know, there are a lot of arrays. However I found that storing the
xlDoubleQuote, ConsecutiveDelimiter: = False, Tab: = True, Semicolon: = True _ , Comma: = False, Space: = False, Other: = False, FieldInfo: = Array(Array(1, 1) _ , Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1), Array(8, 1), _ Array(9, 1), Array(10, 1), Array(11, 1
OpenText Filename: = "C: \ Users \ jat \ Desktop \ 23-32237", Origin: = xlWindows, StartRow: = 1, DataType: = xlFixedWidth, FieldInfo: = Array(Array(0, 1), Array(14, 1), Array(39, 9), Array(48, 1), Array(54, 1), Array(60, 1), Array(72, 1), Array(85, 1), Array(93, 1), Array(100, 1)), TrailingMinusNumbers: = True it opens