# Apple

## Rotate Image LeetCode Solution

You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise).

## Trapping Rain Water LeetCode Solution

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.

## Merge Two Sorted Lists LeetCode Solution

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.

## Climbing Stairs LeetCode Solution

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?

## Reverse Linked List LeetCode Solution

Given the head of a singly linked list, reverse the list, and return the reversed list.

## Delete Node in a Linked List LeetCode Solution

There is a singly-linked list head and we want to delete a node node in it. Delete the given node

## Reverse Bits LeetCode Solution

Reverse bits of a given 32 bits unsigned integer.

## Maximal Square LeetCode Solution

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.

## Median of Two Sorted Arrays LeetCode Solution

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)).

## Two Sum LeetCode Solution

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.

Scroll to Top