Basic Calculator
Given a string s representing a valid expression, implement a basic calculator to evaluate it, and return the result of the evaluation.
Given a string s representing a valid expression, implement a basic calculator to evaluate it, and return the result of the evaluation.
A path in a binary tree is a sequence of nodes where each pair of adjacent nodes in the sequence has an edge connecting them. A node can only appear in the sequence at most once.
Return the least number of buses you must take to travel from source to target. Return -1 if it is not possible.
Given an array of strings words (without duplicates), return all the concatenated words in the given list of words.
Given an integer array nums and two integers lower and upper, return the number of range sums that lie in [lower, upper] inclusive.
Given a string s, return the sum of countUniqueChars(t) where t is a substring of s. The test cases are generated such that the answer fits in a 32-bit integer.
There are n different online courses numbered from 1 to n...
The median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value, and the median is the mean of the two middle values.
Given an unsorted integer array nums, return the smallest missing positive integer.
Given an array of integers heights representing the histogram's bar height where the width of each bar is 1, return the area of the largest rectangle in the histogram.
Given an m x n integers matrix, return the length of the longest increasing path in matrix.
Given a string containing just the characters '(' and ')', return the length of the longest valid (well-formed) parentheses substring.
Design a stack-like data structure to push elements to the stack and pop the most frequent element from the stack.
You're given the startTime, endTime and profit arrays, return the maximum profit you can take such that there are no two jobs in the subset with overlapping time range.
Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays.
You are given an array of k linked-lists lists, each linked-list is sorted in ascending order.
Return the minimum number of k-bit flips required so that there is no 0 in the array. If it is not possible, return -1.
Given two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every character in t (including duplicates) is included in the window.
The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each other.
You are given a 0-indexed array of unique strings words. A palindrome pair is a pair of integers (i, j) such that:
Design a special dictionary that searches the words in it by a prefix and a suffix.
Given the head of a linked list, reverse the nodes of the list k at a time, and return the modified list.
Design an algorithm to serialize and deserialize a binary tree.
You are given an array of integers 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 numbers in the window.
The median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middle values.
Smallest Range Covering Elements from K Lists
Sort Items by Groups Respecting Dependencies...
Return the starting indices of all the concatenated substrings in s. You can return the answer in any order.
Write a program to solve a Sudoku puzzle by filling the empty cells.
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining.
A transformation sequence from word beginWord to word endWord using a dictionary wordList is a sequence of words beginWord -> s1 -> s2 -> ... -> sk such that...
Given an m x n board of characters and a list of strings words, return all words on the board.