-
Given two strings s and t, determine if they are isomorphic.
Two strings are isomorphic if the characters in s can be replace...
-
Given a binary array, find the maximum number of consecutive 1s in this array.
Example 1:
12345Input: [1,1,0,1,1,1]Output: 3E...
-
268. Missing NumberGiven an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing fro...
-
219. Contains Duplicate II
Given an array of integers and an integer k, find out whether there are two distinct indices i and...
-
189. Rotate Array
Rotate an array of n elements to the right by k steps.
For example, with n = 7 and k = 3, the array [1,2,3,...
-
66. Plus OneGiven a non-negative integer represented as a non-empty array of digits, plus one to the integer.
You may assume...
-
88. Merge Sorted Array
Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.
Note:You...
-
167. Two Sum II - Input array is sorted
Given an array of integers that is already sorted in ascending order, find two numbe...
-
136 Single Number
Given an array of integers, every element appears twice except for one. Find that single one.
Note:Your alg...
-
107. Binary Tree Level Order Traversal II
Given a binary tree, return the bottom-up level order traversal of its nodes’ value...