【发布时间】:2015-12-29 18:04:28
【问题描述】:
给定一个数字,我们必须在保留顺序的同时找到最大的“K”位数字(“K”位数字将是一个子序列)。
Input : The number 'n' and number of digits you should pick up to form the answer 'K'
Output : The maximum formed K digit number
例子:
Input : n = 912583, k=3
Output : 983
【问题讨论】:
-
很好的问题,但你的问题是什么?
-
你的尝试在哪里?
-
@Henry 问题是找到给定 K 的 K 位数。
-
@Ignacio Vazquez-Abrams 我试过了,但我无法提出解决方案。所以我想从别人那里得到帮助。
标签: algorithm dynamic-programming greedy