摘要:
题目: There is a fence with n posts, each post can be painted with one of the k colors. You have to paint all the posts such that no more than two adjac 阅读全文
摘要:
题目: Given a non-empty binary search tree and a target value, find the value in the BST that is closest to the target. Note: Given target value is a fl 阅读全文
摘要:
题目: Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. For example,Given nums = [0, 阅读全文
摘要:
题目: Given a string, determine if a permutation of the string could form a palindrome. For example,"code" -> False, "aab" -> True, "carerac" -> True. H 阅读全文
摘要:
题目: Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For 阅读全文