You are given a stringnumrepresentingthe digitsof a very large integer and an integerk. You are allowed to swap any two adjacent digits of the integerat mostktimes. Returnthe minimum integer you can obtain also as a string. Example 1: Input:num = "4321", k = 4Output:"1342"Explanation:...
ip地址 Given a string containing only digits, restore it by returning all possible valid IP address combinations. For example: Given”25525511135”, return[“255.255.11.135”, “255.255.111.35”]. (Order does not matter) 这道题要求我们复原IP地址。 IP地址由32位二进制数组成,为便于使用,常以XXX....
0804-Unique-Morse-Code-Words 0805-Split-Array-With-Same-Average 0806-Number-of-Lines-To-Write-String 0807-Max-Increase-to-Keep-City-Skyline 0809-Expressive-Words 0811-Subdomain-Visit-Count 0817-Linked-List-Components 0819-Most-Common-Word 0827-Making-A-Large-Island 0841-...
给你一个字符串num和一个整数k。其中,num表示一个很大的整数,字符串中的每个字符依次对应整数上的各个数位。 你可以交换这个整数相邻数位的数字最多k次。 请你返回你能得到的最小整数,并以字符串形式返回。 示例1: 输入:num = "4321", k = 4输出:"1342"解释:4321 通过 4 次交换相邻数位得到最小整数...