摘要:
Excel Sheet Column Title Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example: 1 -> A 2 -> B 3 -> 阅读全文
摘要:
Reverse String Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "olleh". 阅读全文
摘要:
Power of Four Given an integer (signed 32 bits), write a function to check whether it is a power of 4. Example: Given num = 16, return true. Given num 阅读全文
摘要:
Integer Break Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return t 阅读全文
摘要:
Power of Three Given an integer, write a function to determine if it is a power of three. Follow up: Could you do it without using any loop / recursio 阅读全文
摘要:
Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and r 阅读全文
摘要:
Bulb Switcher There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you 阅读全文
摘要:
Missing Number Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. For example, Give 阅读全文
摘要:
Valid Anagram Given two strings s and t, write a function to determine if t is an anagram of s. For example, s = "anagram", t = "nagaram", return true 阅读全文
摘要:
Power of Two Given an integer, write a function to determine if it is a power of two. 阅读全文
摘要:
Excel Sheet Column Number Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, return its corresponding colu 阅读全文
摘要:
Contains Duplicate Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at lea 阅读全文
摘要:
Majority Element Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You ma 阅读全文