摘要: You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Note: You have to rotate the image in-place, which 阅读全文
posted @ 2019-01-31 13:59 Schwifty 阅读(283) 评论(0) 推荐(0)
摘要: Given a sorted linked list, delete all duplicates such that each element appear only once. Example 1: Example 2: 另一种迭代,更好懂。cur一直等于prev的next,用prev来判断后面 阅读全文
posted @ 2019-01-31 13:37 Schwifty 阅读(161) 评论(0) 推荐(0)
摘要: Given a collection of distinct integers, return all possible permutations. Example: Input: [1,2,3] Output: [ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1, 阅读全文
posted @ 2019-01-31 13:03 Schwifty 阅读(172) 评论(0) 推荐(0)
摘要: Webstorm 创建html5 文件快捷键 Ctrl+alt+Insert 如何在WebStorm中光标移到最后最前:End 和 Home 如何迅速在多行同位置插入相同内容? 点击,Alt,按住往下拖 如何快速复制 / 删除光标所在行内容?Ctrl + D / Ctrl + X 选中文字,Ctrl 阅读全文
posted @ 2019-01-30 14:38 Schwifty 阅读(154) 评论(0) 推荐(0)
摘要: Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all unique q 阅读全文
posted @ 2019-01-30 13:11 Schwifty 阅读(159) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2019-01-30 11:16 Schwifty 阅读(85) 评论(0) 推荐(0)
摘要: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. 阅读全文
posted @ 2019-01-30 09:21 Schwifty 阅读(167) 评论(0) 推荐(0)
摘要: The count-and-say sequence is the sequence of integers with the first five terms as following: 1 is read off as "one 1" or 11.11 is read off as "two 1 阅读全文
posted @ 2019-01-29 23:32 Schwifty 阅读(114) 评论(0) 推荐(0)
摘要: Determine if a 9x9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules: Each row must contain the digit 阅读全文
posted @ 2019-01-29 05:41 Schwifty 阅读(138) 评论(0) 推荐(0)
摘要: Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime com 阅读全文
posted @ 2019-01-29 02:43 Schwifty 阅读(146) 评论(0) 推荐(0)