leetcode_670. Maximum Swap ? 待解决
来源:互联网 发布:东方project mac版 编辑:程序博客网 时间:2024/06/01 16:38
Given a non-negative integer, you could swap two digits at most once to get the maximum valued number. Return the maximum valued number you could get.
Example 1:
Input: 2736
Output: 7236
Explanation: Swap the number 2 and the number 7.
Example 2:
Input: 9973
Output: 9973
Explanation: No swap.
Note:
The given number is in the range [0, 108]
提示:提交代码后,需要用简洁的语言解释一下代码思路~ 谢谢
历史题目和总结见公众号「每日一道算法题」
https://leetcode.com/problems/maximum-swap/description/
思路:
阅读全文
0 0
- leetcode_670. Maximum Swap ? 待解决
- leetcode_646. Maximum Length of Pair Chain ? 待解决
- Leetcode--670. Maximum Swap
- 670. Maximum Swap
- 670. Maximum Swap
- leetcode-670-Maximum Swap
- leetcode 670. Maximum Swap
- 670. Maximum Swap
- LeetCode 670. Maximum Swap
- 670. Maximum Swap(Java)
- LeetCode670. Maximum Swap
- LeetCode-Maximum Swap
- 670. Maximum Swap
- leetcode 670 Maximum Swap
- leetCode-Maximum Swap
- LeetCode670. Maximum Swap
- 670. Maximum Swap
- leetcode 670. Maximum Swap
- 和前端撕出逼格,撕的硬气
- 如何编写一个拼写纠错器?
- INIT_WORK
- 产品新人的10字生存手册
- 「产品规划」的那些事儿
- leetcode_670. Maximum Swap ? 待解决
- 别让扁平化设计平淡无奇
- GRE Words
- 1029. 旧键盘(20)
- Git常用命令速查表
- matplotlib基础学习
- UGUI气泡的遮挡问题研究与解决
- Linux 查看挂载盘中文件
- inux命令:ps命令