
leetcode刷题
花落知多少灬
这个作者很懒,什么都没留下…
展开
-
leetCode之Two Sum python实现
1. Two Sum要求: Given an array of integers, return indices of the two numbers such that they add up to a specific target。 You may assume that each input would have exactly one solution, and you may no原创 2017-11-15 21:52:58 · 1039 阅读 · 0 评论 -
leetCode之Add Two Numbers python实现
2 Add Two Numbers要求: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the tw原创 2017-11-15 22:18:53 · 332 阅读 · 0 评论 -
leetCode之Longest Substring Without Repeating Characters实现
3 Longest Substring Without Repeating Characters要求: Given a string, find the length of the longest substring without repeating characters. Examples: Given “abcabcbb”, the answer is “abc”, which the原创 2017-11-15 22:43:44 · 197 阅读 · 0 评论 -
数字序列中某一位的数字
""" 012345678910...序列中,第n位数"""def solution(n): if n < 0: return -1 if n < 10: return n i = 2 # 确定是第几位数 sums = 10 ret = 0 while True: # 一位...原创 2019-06-28 20:58:45 · 158 阅读 · 0 评论