- 博客(13)
- 收藏
- 关注
原创 LeetCode | 35. Search Insert Position
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array.Ex...
2019-01-07 10:01:40 112 1
原创 LeetCode | 28. Implement strStr()
DescriptionImplement strStr().Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Example 1:Input: haystack = "hello", needle = "ll"Output: 2...
2019-01-06 11:52:43 125 1
原创 LeetCode | 27. Remove Element
DescriptionGiven an array nums and a value val, remove all instances of that value in-place and return the new length.Do not allocate extra space for another array, you must do this by modifying the...
2019-01-05 19:22:53 83
原创 LeetCode | 26. Remove Duplicates from Sorted Array
DescriptionGiven a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this...
2019-01-05 18:58:36 132
原创 LeetCode | 21. Merge Two Sorted Lists
DescriptionMerge 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:Input: 1->2->4, 1->3->4O...
2019-01-05 17:16:32 82
原创 CSAPP | Representing and Manipulating Information
Virtual Memory: a very large array of bytes --> combination of DRAM, flash memory, disk storage, special hardware, and operating system software to provide the program with what appears to be a mon...
2019-01-04 13:31:21 119
原创 CSAPP | A Tour
Why we need to understand how compilation systems work?Optimizing program performanceUnderstanding link-time errorsAvoiding security holesBuses: transfer fixed-size chunks of bytes known as wor...
2019-01-03 22:22:42 131
原创 LeetCode | 20. Valid Parentheses
DescriptionGiven a string containing just the characters ‘(’, ‘)’, ‘{’, ‘}’, ‘[’ and ‘]’, determine if the input string is valid.An input string is valid if:Open brackets must be closed by the same...
2019-01-02 12:05:59 75
原创 LeetCode | 14. Longest Common Prefix
DescriptionWrite a function to find the longest common prefix string amongst an array of strings.If there is no common prefix, return an empty string “”.Example 1:Input: ["flower","flow","flight"]..
2019-01-02 11:41:49 103 1
原创 LeetCode | 13. Roman to Integer
DescriptionRoman numerals are represented by seven different symbols: I, V, X, L, C, D and M.SymbolValueI1V5X10L50C100D500M1000For example, two is written as II...
2019-01-02 10:22:40 99
原创 LeetCode | 9. Palindrome Number
DescriptionDetermine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward.Example 1:Input: 121Output: trueExample 2:Input: -121Output: fals...
2019-01-01 17:42:47 156
原创 LeetCode | 7. Reverse Integer
DescriptionGiven a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example 2:Input: -123Output: -321Example 3:Input: 120Output: 21Note:Assume we are d...
2019-01-01 11:11:19 95
原创 LeetCode | 1. Two Sum
LeetCode | 1. TwoSumDescriptionFor Loops | 暴力解题法Hash Table | 聪明的哈希表One Loop Hash Table | 精简哈希表DescriptionGiven an array of integers, return indices of the two numbers such that they add up to a spec...
2019-01-01 08:32:08 163
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人