数组的最长递减子序列

编程入门 行业动态 更新时间:2024-10-15 06:13:41
本文介绍了数组的最长递减子序列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

向大家问好 我想找到数组的最长递减子序列 int [] arr = {5,8,4,3,2,10,9,7,5,3,12,2} 在C#中如何帮助我

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

推荐答案

由于这是您的作业,因此我不会给您代码. 但是,有许多不同的方法可以执行此操作,从嵌套循环的Brute-Force-And-Ignorance方法开始,到为每个节点创建树都结束. Google会为您提供帮助,但我不能-我不知道您有多少经验(尽管我怀疑不多),因此不能根据您的经验推荐解决方案. 如果其他所有方法都失败了,那么虽然蛮慢,但蛮力强制和无知是一种易于实现的方法! 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!

更多推荐

数组的最长递减子序列

本文发布于:2023-11-29 19:59:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1647478.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数组   序列   最长

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!