int("123") 123 int("3f",16) 63 bytes([72,9,64]) b'H\t@' list("abc") ['a', 'b', 'c'] set(["one","two"]) {'one','two'} [int(x) for x in ('1','29','-3')] ...
分类:
其他好文 时间:
2019-02-01 21:52:23
阅读次数:
195
算法描述: The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the tot ...
分类:
其他好文 时间:
2019-02-01 17:06:02
阅读次数:
164
1)Dealing with the client sideFirst of all, to deal on the client side /etc/ssh/ssh_configor ~/.ssh/configto describe the contents of two following.$ ... ...
分类:
其他好文 时间:
2019-02-01 13:04:44
阅读次数:
335
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Example: ...
分类:
其他好文 时间:
2019-01-31 22:59:42
阅读次数:
198
first,I wish you a happy new year, and study in spring festival’s eve means you are hardworking,haha. I write in two languages. One passage write in C ...
分类:
编程语言 时间:
2019-01-31 22:56:16
阅读次数:
238
[toc] 题目链接 " Merge Two Sorted Lists LeetCode" 注意点 和3Sum那道题一样 解法 解法一:在 "3Sum" 的基础上再加一层循环即可。时间复杂度为O(n^3) 解法二:看了评论得到的思路。先二重循环,将所有可能出现的两数之和的值map保存。然后再二重循环 ...
分类:
其他好文 时间:
2019-01-31 15:48:44
阅读次数:
146
https://leetcode.com/problems/minimum-index-sum-of-two-lists/ Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list ...
分类:
其他好文 时间:
2019-01-31 01:28:37
阅读次数:
169
A continued fraction of height n is a fraction of form . You are given two rational numbers, one is represented as and the other one is represented as ...
分类:
编程语言 时间:
2019-01-30 23:13:11
阅读次数:
155
[toc] 题目链接 " Merge Two Sorted Lists LeetCode" 注意点 两个链表长度可能不一致 解法 解法一:先比较两个链表长度一致的部分,多余的部分直接加进答案链表即可。时间复杂度为O(n) 小结 通常链表开头的第一个结点不存放数据,或者是不用来存放数据仅仅是作为一个向 ...
分类:
其他好文 时间:
2019-01-30 14:23:26
阅读次数:
114
Given a linked list, swap every two adjacent nodes and return its head. Example: Note: Your algorithm should use only constant extra space. You may no ...
分类:
其他好文 时间:
2019-01-30 13:05:10
阅读次数:
123