摘要: Design your implementation of the linked list. You can choose to use a singly or doubly linked list.A node in a singly linked list should have two att 阅读全文
posted @ 2020-10-25 12:54 little_veggie 阅读(152) 评论(0) 推荐(0)
摘要: Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. Example 阅读全文
posted @ 2020-10-25 11:55 little_veggie 阅读(67) 评论(0) 推荐(0)
摘要: Design a data structure that follows the constraints of a Least Recently Used (LRU) cache. Implement the LRUCache class: LRUCache(int capacity) Initia 阅读全文
posted @ 2020-10-10 14:15 little_veggie 阅读(106) 评论(0) 推荐(0)
摘要: Given a collection of intervals, merge all overlapping intervals. Example 1: Input: intervals = [[1,3],[2,6],[8,10],[15,18]] Output: [[1,6],[8,10],[15 阅读全文
posted @ 2020-10-04 03:38 little_veggie 阅读(121) 评论(0) 推荐(0)
摘要: Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endWord, 阅读全文
posted @ 2020-10-03 14:07 little_veggie 阅读(131) 评论(0) 推荐(0)
摘要: Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime com 阅读全文
posted @ 2020-10-03 11:49 little_veggie 阅读(107) 评论(0) 推荐(0)
摘要: Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), find the minimum number of conference room 阅读全文
posted @ 2020-10-03 06:31 little_veggie 阅读(125) 评论(0) 推荐(0)
摘要: Given an array of strings products and a string searchWord. We want to design a system that suggests at most three product names from products after e 阅读全文
posted @ 2020-09-01 13:16 little_veggie 阅读(261) 评论(0) 推荐(0)
摘要: A string S of lowercase English letters is given. We want to partition this string into as many parts as possible so that each letter appears in at mo 阅读全文
posted @ 2020-08-24 08:54 little_veggie 阅读(163) 评论(0) 推荐(0)
摘要: Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k num 阅读全文
posted @ 2020-08-22 07:01 little_veggie 阅读(87) 评论(0) 推荐(0)