432 All Oone Data Structure
All O`one Data Structure Design a data structure to store the strings’ count with the ability to return the strings with minimum and maximum counts. Implement the AllOne class: AllOne() Initial...
All O`one Data Structure Design a data structure to store the strings’ count with the ability to return the strings with minimum and maximum counts. Implement the AllOne class: AllOne() Initial...
My Calendar II You are implementing a program to use as your calendar. We can add a new event if adding the event will not cause a triple booking. A triple booking happens when three events have...
Design Circular Deque Design your implementation of the circular double-ended queue (deque). Implement the MyCircularDeque class: MyCircularDeque(int k) Initializes the deque with a maximum siz...
Sum of Prefix Scores of Strings You are given an array words of size n consisting of non-empty strings. We define the score of a string word as the number of strings words[i] such that word is a...
Extra Characters in a String You are given a 0-indexed string s and a dictionary of words dictionary. You have to break s into one or more non-overlapping substrings such that each substring is p...
K-th Smallest in Lexicographical Order Given two integers n and k, return the kth lexicographically smallest integer in the range [1, n]. Example 1: **Input:** n = 13, k = 2 **Output:** 10 ...
Shortest Palindrome You are given a string s. You can convert s to a palindrome by adding characters in front of it. Return the shortest palindrome you can find by performing this transformation...
Different Ways to Add Parentheses Given a string expression of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. Yo...
Largest Number Given a list of non-negative integers nums, arrange them such that they form the largest number and return it. Since the result may be very large, so you need to return a string i...
Uncommon Words from Two Sentences A sentence is a string of single-space separated words where each word consists only of lowercase letters. A word is uncommon if it appears exactly once in one ...