摘要:
There are n different online courses numbered from 1 to n. Each course has some duration(course length) t and closed on dth day. A course should be ta 阅读全文
posted @ 2018-11-30 15:19
bernieloveslife
阅读(170)
评论(0)
推荐(0)
摘要:
Given an integer, write a function to determine if it is a power of two. Example 1: Input: 1 Output: true Explanation: 20 = 1 Example 2: Input: 16 Out 阅读全文
posted @ 2018-11-30 15:19
bernieloveslife
阅读(90)
评论(0)
推荐(0)
摘要:
Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occurrenc 阅读全文
posted @ 2018-11-30 15:19
bernieloveslife
阅读(94)
评论(0)
推荐(0)
摘要:
Given a non empty array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runti 阅读全文
posted @ 2018-11-30 15:19
bernieloveslife
阅读(98)
评论(0)
推荐(0)
摘要:
Given an integer array nums, find the contiguous subarray within an array (containing at least one number) which has the largest product. Example 1: I 阅读全文
posted @ 2018-11-30 15:18
bernieloveslife
阅读(74)
评论(0)
推荐(0)
摘要:
The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, calcul 阅读全文
posted @ 2018-11-30 15:18
bernieloveslife
阅读(122)
评论(0)
推荐(0)
摘要:
Given an input string, reverse the string word by word. Example: Input: "the sky is blue", Output: "blue is sky the". Note: A word is defined as a seq 阅读全文
posted @ 2018-11-30 15:18
bernieloveslife
阅读(90)
评论(0)
推荐(0)
摘要:
Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example: 1 A 2 B 3 C ... 26 Z 27 AA 28 AB ... Example 阅读全文
posted @ 2018-11-30 15:18
bernieloveslife
阅读(83)
评论(0)
推荐(0)
摘要:
Convert a non negative integer to its english words representation. Given input is guaranteed to be less than 231 1. Example 1: Input: 123 Output: "On 阅读全文
posted @ 2018-11-30 15:18
bernieloveslife
阅读(88)
评论(0)
推荐(0)
摘要:
Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? No extra space solution: 阅读全文
posted @ 2018-11-30 15:18
bernieloveslife
阅读(79)
评论(0)
推荐(0)
摘要:
Reverse a singly linked list. Example: Input: 1 2 3 4 5 NULL Output: 5 4 3 2 1 NULL Follow up: A linked list can be reversed either iteratively or rec 阅读全文
posted @ 2018-11-30 15:18
bernieloveslife
阅读(69)
评论(0)
推荐(0)
摘要:
Given a linked list, rotate the list to the right by k places, where k is non negative. Example 1: Input: 1 2 3 4 5 NULL, k = 2 Output: 4 5 1 2 3 NULL 阅读全文
posted @ 2018-11-30 15:18
bernieloveslife
阅读(76)
评论(0)
推荐(0)
摘要:
Given an absolute path for a file (Unix style), simplify it. For example, path = "/home/", = "/home" path = "/a/./b/../../c/", = "/c" path = "/a/../.. 阅读全文
posted @ 2018-11-30 15:18
bernieloveslife
阅读(99)
评论(0)
推荐(0)
摘要:
Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally ident 阅读全文
posted @ 2018-11-30 15:18
bernieloveslife
阅读(90)
评论(0)
推荐(0)
摘要:
Let's call an array A a mountain if the following properties hold: A.length = 3 There exists some 0 A[i+1] ... A[A.length 1] Given an array that is de 阅读全文
posted @ 2018-11-30 15:18
bernieloveslife
阅读(92)
评论(0)
推荐(0)
摘要:
Given a list of strings words representing an English Dictionary, find the longest word in words that can be built one character at a time by other wo 阅读全文
posted @ 2018-11-30 15:17
bernieloveslife
阅读(112)
评论(0)
推荐(0)
摘要:
Given an array nums and a value val, remove all instances of that value in place and return the new length. Do not allocate extra space for another ar 阅读全文
posted @ 2018-11-30 15:17
bernieloveslife
阅读(92)
评论(0)
推荐(0)
摘要:
Given an integer, return its base 7 string representation. Example 1: Input: 100 Output: "202" Example 2: Input: 7 Output: " 10" Note: The input will 阅读全文
posted @ 2018-11-30 15:17
bernieloveslife
阅读(88)
评论(0)
推荐(0)
摘要:
Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive intege 阅读全文
posted @ 2018-11-30 15:17
bernieloveslife
阅读(84)
评论(0)
推荐(0)
摘要:
Write a function that takes an unsigned integer and returns the number of '1' bits it has (also known as the Hamming weight). Example 1: Input: 11 Out 阅读全文
posted @ 2018-11-30 15:17
bernieloveslife
阅读(83)
评论(0)
推荐(0)

浙公网安备 33010602011771号