- 博客(3)
- 收藏
- 关注
原创 Leetcode 1041. Robot Bounded In Circle
Leetcode 1041. Robot Bounded In Circle On an infinite plane, a robot initially stands at (0, 0) and faces north. The robot can receive one of three instructions: “G”: go straight 1 unit; “L”: turn 90 degrees to the left; “R”: turn 90 degrees to the right.
2021-02-17 10:55:10
176
原创 Leetcode 380. Insert Delete GetRandom O(1)
Leetcode 380. Insert Delete GetRandom O(1) Implement the RandomizedSet class: bool insert(int val) Inserts an item val into the set if not present. Returns true if the item was not present, false otherwise. bool remove(int val) Removes an item val from the
2021-02-16 04:47:01
171
原创 Leetcode 146. LRU Cache
Leetcode 146. LRU Cache Design a data structure that follows the constraints of a Least Recently Used (LRU) cache. Implement the LRUCache class: LRUCache(int capacity) Initialize the LRU cache with positive size capacity. int get(int key) Return the value
2021-02-15 01:25:23
222
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅