[問題]n位整數拿掉m數字得到最大數值
看板Prob_Solve (計算數學 Problem Solving)作者PATRICKSTARS (PatrickStar)時間11年前 (2013/11/13 22:05)推噓10(10推 0噓 4→)留言14則, 7人參與討論串1/5 (看更多)
Given an integer (not necessary a decimal number) with n digits, we want to
remove m (<=n) digits from this number such that the resulting number is as
large as possible. Design an O(n) time algorithm to solve it.
可以提示如何下手嗎?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 111.251.105.172
推
11/13 22:10, , 1F
11/13 22:10, 1F
推
11/13 22:14, , 2F
11/13 22:14, 2F
→
11/13 22:15, , 3F
11/13 22:15, 3F
→
11/13 22:22, , 4F
11/13 22:22, 4F
推
11/13 22:53, , 5F
11/13 22:53, 5F
推
11/13 23:00, , 6F
11/13 23:00, 6F
推
11/13 23:08, , 7F
11/13 23:08, 7F
推
11/13 23:34, , 8F
11/13 23:34, 8F
→
11/13 23:35, , 9F
11/13 23:35, 9F
推
11/13 23:38, , 10F
11/13 23:38, 10F
推
11/14 00:13, , 11F
11/14 00:13, 11F
→
11/14 00:13, , 12F
11/14 00:13, 12F
推
11/14 15:54, , 13F
11/14 15:54, 13F
推
11/15 11:51, , 14F
11/15 11:51, 14F
討論串 (同標題文章)
Prob_Solve 近期熱門文章
PTT數位生活區 即時熱門文章