- 博客(16)
- 收藏
- 关注
原创 LeetCode解题笔记350 Intersection of Two Arrays II
题目:Given two arrays, write a function to compute their intersection.Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2].Note:Each element in the result should app
2018-02-04 15:23:29
189
原创 LeetCode解题笔记349 Intersection of Two Arrays
题目:Given two arrays, write a function to compute their intersection.Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2].Note:Each element in the result must be uniqu
2018-02-04 15:19:42
176
原创 LeetCode解题笔记290 Word Pattern
题目:Given a pattern and a string str, find if str follows the same pattern.Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word
2018-02-04 00:47:08
156
原创 LeetCode解题笔记242 Valid Anagram
题目:Given two strings s and t, write a function to determine if t is an anagram of s.For example,s = "anagram", t = "nagaram", return true.s = "rat", t = "car", return false.Note:Yo
2018-02-04 00:32:52
183
原创 LeetCode解题笔记205 Isomorphic Strings
题目:Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occurrences of a character must be replaced
2018-02-04 00:31:12
214
原创 LeetCode解题笔记204 Count Primes
题目:Description:Count the number of prime numbers less than a non-negative number, n.python解法一:思路:当前的数字的倍数都不是素数。class Solution: def countPrimes(self, n): """ :type n
2018-02-03 23:56:30
160
原创 LeetCode解题笔记36 Valid Sudoku
题目:Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with the character '.'.A partia
2018-02-01 23:04:02
171
原创 LeetCode解题笔记37 Sudoku Solver
题目:Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character '.'.You may assume that there will be only one unique solution.
2018-02-01 23:01:19
180
原创 LeetCode解题笔记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 two numbers a
2018-02-01 18:32:07
179
原创 LeetCode解题笔记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 not us
2018-02-01 18:21:20
169
原创 ubantu虚拟机重启后进入initrafms
ubantu虚拟机重启后无法进入图形化界面,而是进入initrafms模式,可能是文件系统损坏,尝试进行修复。initrafms模式如下图所示:使用fsck/dev/sda1命令进行修复:一路y下来,最终修复成功,然后重启。
2018-01-24 15:40:16
932
原创 LeetCode解题笔记136 Single Number
题目:Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without
2018-01-23 16:12:49
198
原创 LeetCode解题笔记212 Word Search II
题目:Given a 2D board and a list of words from the dictionary, find all words in the board.Each word must be constructed from letters of sequentially adjacent cell, where "adjacent" cells are
2018-01-23 14:42:48
231
原创 LeetCode解题笔记79 Word Search
题目:Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or v
2018-01-23 11:24:39
176
原创 LeetCode解题笔记62 Unique Paths
原题目:A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move either down or right at any point in time. The robot is trying to reach the
2018-01-18 15:33:50
169
原创 LeetCode解题笔记45 Jump Game II
原题目:Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.You
2018-01-17 17:28:39
239
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅