1 2 3 4 5 ··· 13 下一页
摘要: 题目描述: Given four lists A, B, C, D of integer values, compute how many tuples (i, j, k, l) there are such that A[i] + B[j] + C[k] + D[l] is zero. To ma 阅读全文
posted @ 2018-11-10 21:16 宵夜在哪 阅读(105) 评论(0) 推荐(0) 编辑
摘要: Description: 魔兽世界的西面是红魔军的司令部,东面是蓝魔军的司令部。两个司令部之间是依次排列的若干城市,城市从西向东依次编号为1,2,3 .... N ( N <= 20 )。红魔军的司令部算作编号为0的城市,蓝魔军的司令部算作编号为N+1的城市。司令部有生命元,用于制造武士。 两军的司 阅读全文
posted @ 2018-08-21 19:47 宵夜在哪 阅读(666) 评论(0) 推荐(1) 编辑
摘要: 题目描述: Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contain 阅读全文
posted @ 2018-04-18 23:06 宵夜在哪 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a string containing only digits, restore it by returning all possible valid IP address combinations. For example: Given "25525511135", ret 阅读全文
posted @ 2018-04-17 16:30 宵夜在哪 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example, Given n = 3, there are a total of 5 uniq 阅读全文
posted @ 2018-04-16 09:14 宵夜在哪 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given an integer n, generate all structurally unique BST's (binary search trees) that store values 1...n. For example, Given n = 3, your program 阅读全文
posted @ 2018-04-15 09:37 宵夜在哪 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given an absolute path for a file (Unix-style), simplify it. For example, path = "/home/", => "/home" path = "/a/./b/../../c/", => "/c" Corner C 阅读全文
posted @ 2018-04-14 22:33 宵夜在哪 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two ele 阅读全文
posted @ 2018-04-13 19:53 宵夜在哪 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given an unsorted array of integers, find the length of longest increasing subsequence. For example, Given [10, 9, 2, 5, 3, 7, 101, 18], The lon 阅读全文
posted @ 2018-04-12 23:33 宵夜在哪 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums e 阅读全文
posted @ 2018-04-11 19:04 宵夜在哪 阅读(85) 评论(0) 推荐(0) 编辑
1 2 3 4 5 ··· 13 下一页