Rotate Image LeetCode Solution
You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise).
You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise).
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.
You are given the heads of two sorted linked lists list1 and list2. Merge the two lists in a one sorted list. The list should be made by splicing together the nodes of the first two lists. Return the head of the merged linked list.
You are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
Given the head of a singly linked list, reverse the list, and return the reversed list.
There is a singly-linked list head and we want to delete a node node in it. Delete the given node
Reverse bits of a given 32 bits unsigned integer.
Given an m x n binary matrix filled with 0’s and 1’s, find the largest square containing only 1’s and return its area.
Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice.