主要应用的是Hash Table 要对每种基础数据结构有深刻的理解。主要应对设计题: HashTable: 增、删、查都是O(1),但是是无序的 vector: 增(尾部增O(1)、其他O(n))、删(尾部删O(1)、其…
分类:LeetCode
[LeetCode] Search a 2D Matrix 搜索一个二维矩阵
Write an efficient algorithm that searches for a value in an m x n matrix. This mat…
[LeetCode] Design Linked List 设计链表
Design your implementation of the linked list. You can choose to use the singly linked list or the…
[LeetCode] Shortest Completing Word 最短完整的单词
Find the minimum length word from a given dictionary words, which has all the letters from the str…
VirtualBox中Centos6.8网络设置
项目要求在terminal里面输入ifconfig 会出现当前ip address: inet addr. 但现在没有。
二刷244. Shortest Word Distance II
Medium 一开始直接clone数组居然TLE, 后来初始化的时候把shortest初始化为map.size()肯定有问题的,因为dict里面是允许duplicate的,所有你map.size()有可能是小于单词最大距…
LeetCode刷题之Reverse Integer
Problem Reverse digits of an integer. Example:x = 123, return 321 Example:x = -123, return -321 Note: The inpu…
33. Search in Rotated Sorted Array
欢迎fork and star:Nowcoder-Repository-github 33. Search in Rotated Sorted Array 题目 Suppose an array sorted in as…
LeetCode | Binary Tree Zigzag Level Order Traversal
题目: Given a binary tree, return the zigzag level order traversal of its nodes’ values. (ie, fr…
LeetCode | Two Sum
题目: Given an array of integers, find two numbers such that they add up to a specific target number. The functi…
241. Different Ways to Add Parentheses
Given a string of numbers and operators, return all possible results from computing all the different possible…
LeetCode | Unique Paths(唯一路径)
A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in t…