Click here to Skip to main content
15,919,245 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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
Posted
Updated 3-Feb-12 20:17pm
v2

1 solution

Since this is your homework, I won't give you code.

However, there are a lot of different ways to do this, starting with the Brute-Force-And-Ignorance approach of nested loops, and ending with creating a tree for each node.

Google will help you, but I can't - I don't know how much experience you have (although I suspect not much) and so can't recommend a solution based on what you know how to do.

If everything else fails, Brute-Force-And-Ignorance is an easy to implement approach, although somewhat slow!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900