摘要:
You are given an array of k linked-lists lists, each linked-list is sorted in ascending order. Merge all the linked-lists into one sorted linked-list 阅读全文
摘要:
Given an integer n, return the number of ways you can write n as the sum of consecutive positive integers. Example 1: Input: n = 5 Output: 2 Explanati 阅读全文
摘要:
Given an array of strings words (without duplicates), return all the concatenated words in the given list of words. A concatenated word is defined as 阅读全文
摘要:
Design and implement a data structure for a Least Frequently Used (LFU) cache. Implement the LFUCache class: LFUCache(int capacity) Initializes the ob 阅读全文
摘要:
You are given an integer array nums and you have to return a new counts array. The counts array has the property where counts[i] is the number of smal 阅读全文
摘要:
Given a string s and a dictionary of strings wordDict, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all 阅读全文
摘要:
Design a search autocomplete system for a search engine. Users may input a sentence (at least one word and end with a special character '#'). You are 阅读全文
摘要:
You are starving and you want to eat food as quickly as possible. You want to find the shortest path to arrive at any food cell. You are given an m x 阅读全文
摘要:
Given the postfix tokens of an arithmetic expression, build and return the binary expression tree that represents this expression. Postfix notation is 阅读全文
摘要:
You have a queue of integers, you need to retrieve the first unique integer in the queue. Implement the FirstUnique class: FirstUnique(int[] nums) Ini 阅读全文