摘要:
Question: Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runt 阅读全文
摘要:
Question: Given a binary array, find the maximum number of consecutive 1s in this array. Solution: 题目直达:https://leetcode.com/problems/max-consecutive- 阅读全文
摘要:
Question: You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horiz 阅读全文
摘要:
Question: You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers 阅读全文
摘要:
Question: Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Example 1: 阅读全文
摘要:
Question: The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and 阅读全文
摘要:
Question: Write a function that takes a string as input and returns the string reversed. Example 1: Note: Solution: 题目直达:https://leetcode.com/problems 阅读全文
摘要:
Question: Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three it should output “Fizz” instead of 阅读全文
摘要:
Question: Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image be 阅读全文
摘要:
Question: Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which mak 阅读全文