Accounts Merge
Given a list of accounts where each element accounts[i] is a list of strings, where the first element accounts[i][0] is a name, and the rest of the elements are emails representing emails of the account.
Given a list of accounts where each element accounts[i] is a list of strings, where the first element accounts[i][0] is a name, and the rest of the elements are emails representing emails of the account.
Given the root of a binary tree, return the level order traversal of its nodes' values. (i.e., from left to right, level by level).
Given the root of a binary tree, return the zigzag level order traversal of its nodes' values. (i.e., from left to right, then right to left for the next level and alternate between).
Given an array of integers temperatures represents the daily temperatures, return an array answer such that answer[i] is the number of days you have to wait after the ith day to get a warmer temperature.
You are given an array of strings tokens that represents an arithmetic expression in a Reverse Polish Notation.
You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k.
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.
Return the smallest character in letters that is lexicographically greater than target. If such a character does not exist, return the first character in letters.
Implement the RandomizedSet class...
You are given an array of non-overlapping intervals intervals where intervals[i] = [starti, endi] represent the start and the end of the ith interval and intervals is sorted in ascending order by starti.
Given an array of points where points[i] = [xi, yi] represents a point on the X-Y plane and an integer k, return the k closest points to the origin (0, 0).
Given an integer array nums and an integer k, return the kth largest element in the array.
Given a binary search tree (BST), find the lowest common ancestor (LCA) node of two given nodes in the BST.
Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.
Design a data structure that follows the constraints of a Least Recently Used (LRU) cache.
Given the root of a binary tree, return its maximum depth.
Given an integer array nums, find a subarray that has the largest product, and return the product.
Given an integer array nums, find the subarray which has the largest sum and return its sum.
Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays.
Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals...
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
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.
Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands.
Given an integer array nums and an integer k, return true if it is possible to divide this array into k non-empty subsets whose sums are all equal.
Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order.
Implement pow(x, n), which calculates x raised to the power n.
You need to implement the function pickIndex(), which randomly picks an index in the range [0, w.length - 1] (inclusive) and returns it.
Given the head of a linked list, rotate the list to the right by k places.
Given the roots of two binary trees p and q, write a function to check if they are the same or not.
Given the array nums after the possible rotation and an integer target, return the index of target if it is in nums, or -1 if it is not in nums.
Given the array nums after the rotation and an integer target, return true if target is in nums, or false if it is not in nums.
Implement the myAtoi(string s) function, which converts a string to a 32-bit signed integer (similar to C/C++'s atoi function).
Given an array of integers nums and an integer k, return the total number of subarrays whose sum equals to k.
Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.