- 博客(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 113 1
原创 LeetCode | 28. Implement strStr()
Description Implement 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 126 1
原创 LeetCode | 27. Remove Element
Description Given 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 84
原创 LeetCode | 26. Remove Duplicates from Sorted Array
Description Given 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 133
原创 LeetCode | 21. Merge Two Sorted Lists
Description 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: Input: 1->2->4, 1->3->4 O...
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 performance Understanding link-time errors Avoiding security holes Buses: transfer fixed-size chunks of bytes known as wor...
2019-01-03 22:22:42 132
原创 LeetCode | 20. Valid Parentheses
Description Given 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
Description Write 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
Description Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L 50 C 100 D 500 M 1000 For example, two is written as II...
2019-01-02 10:22:40 99
原创 LeetCode | 9. Palindrome Number
Description Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: Input: 121 Output: true Example 2: Input: -121 Output: fals...
2019-01-01 17:42:47 157
原创 LeetCode | 7. Reverse Integer
Description Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: -123 Output: -321 Example 3: Input: 120 Output: 21 Note: 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 | 精简哈希表 Description Given an array of integers, return indices of the two numbers such that they add up to a spec...
2019-01-01 08:32:08 164
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人