摘要:
题目: Given a nested list of integers, return the sum of all integers in the list weighted by their depth. Each element is either an integer, or a list 阅读全文
摘要:
题目: 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 / recursion? 链接: https 阅读全文
摘要:
题目: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Note: 链接: http://leetcode.com/probl 阅读全文
摘要:
题目: You are playing the following Flip Game with your friend: Given a string that contains only these two characters: + and -, you and your friend tak 阅读全文
摘要:
题目: You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 阅读全文
摘要:
题目: Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a l 阅读全文
摘要:
题目: Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. For example, 阅读全文
摘要:
题目: You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quali 阅读全文
摘要:
题目: 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 阅读全文