Sara

  • Home

  • Tags

  • Categories

  • Archives

  • Search

LeetCode_Find Minimum in Rotated Sorted Array

Posted on 2019-03-17 | In LeetCode

Find Minimum in Rotated Sorted Array

Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). Find the minimum element. You may assume no duplicate exists in the array.
(确定一个升序序列经过某个位置翻转后的数组的最小值)

Read more »

LeetCode_Maximum Product Subarray

Posted on 2019-03-17 | In LeetCode

Maximum Product Subarray

Given an integer array nums, find the contiguous subarray within an array (containing at least one number) which has the largest product.
(最大子串乘积)

Read more »

LeetCode_Reverse Words in a String

Posted on 2019-03-17 | In LeetCode

Reverse Words in a String

Given an input string, reverse the string word by word.
(翻转字符串中的词语)

Read more »

LeetCode_Evaluate Reverse Polish Notation

Posted on 2019-03-15 | In LeetCode

Evaluate Reverse Polish Notation

Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or another expression.
(计算逆波兰表达式)

Read more »

LeetCode_Max Points on a Line

Posted on 2019-03-15 | In LeetCode

Max Points on a Line

Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.
(坐标系中共线最多的点数)

Read more »

LeetCode_Sort List

Posted on 2019-03-15 | In LeetCode

Sort List

Sort a linked list in O(n log n) time using constant space complexity.
(实现实现复杂度为O(nlog(n))的链表排序)

Read more »

LeetCode_Insert in Sort List

Posted on 2019-03-15 | In LeetCode

Insert in Sort List

Sort a linked list using insertion sort.
(基于链表的插入排序)

Read more »

LeetCode_LRU Cache

Posted on 2019-03-15 | In LeetCode

LRU Cache

Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and put.

  • get(key) - Get the value (will always be positive) of the key if the key exists in the cache, otherwise return -1.
  • put(key, value) - Set or insert the value if the key is not already present. When the cache reached its capacity, it should invalidate the least recently used item before inserting a new item.

(设计LRU算法的数据结构)

Read more »

LeetCode_Binary Tree Postorder Traversal

Posted on 2019-03-15 | In LeetCode

Binary Tree Postorder Traversal

Given a binary tree, return the postorder traversal of its nodes’ values.
(后序遍历二叉树)

Read more »

LeetCode_Binary Tree Preorder Traversal

Posted on 2019-03-15 | Edited on 2019-08-02 | In LeetCode

Binary Tree Preorder Traversal

Given a binary tree, return the preorder traversal of its nodes’ values.
(先序遍历二叉树)

Read more »
1…567…21

Sara Han

207 posts
4 categories
40 tags
© 2019 Sara Han
Powered by Hexo v3.8.0
|
Theme – NexT.Mist v6.4.2