摘要:
You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can yo... 阅读全文
摘要:
Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The func... 阅读全文
摘要:
Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The func... 阅读全文
摘要:
Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Given nums = [-2, 0, 3, -5, 2, -1]... 阅读全文
摘要:
Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime c... 阅读全文
摘要:
344. Reverse String Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "olleh". clas... 阅读全文
摘要:
344. Reverse String Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "olleh". clas... 阅读全文
摘要:
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 an... 阅读全文
摘要:
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 an... 阅读全文