上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 37 下一页
摘要: 给出两个字符串,找到最长公共子序列(LCS),返回LCS的长度。 给出两个字符串,找到最长公共子序列(LCS),返回LCS的长度。 给出两个字符串,找到最长公共子序列(LCS),返回LCS的长度。 说明 最长公共子序列的定义: 最长公共子序列问题是在一组序列(通常2个)中找到最长公共子序列(注意:不 阅读全文
posted @ 2017-08-26 13:48 immjc 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 给出一个都是正整数的数组 nums,其中没有重复的数。从中找出所有的和为 target 的组合个数。 注意事项 一个数可以在组合中出现多次。数的顺序不同则会被认为是不同的组合。 您在真实的面试中是否遇到过这个题? Yes 给出一个都是正整数的数组 nums,其中没有重复的数。从中找出所有的和为 ta 阅读全文
posted @ 2017-08-25 21:21 immjc 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 给出n个物品的体积A[i]和其价值V[i],将他们装入一个大小为m的背包,最多能装入的总价值有多大? 注意事项 A[i], V[i], n, m均为整数。你不能将物品进行切分。你所挑选的物品总体积需要小于等于给定的m。 您在真实的面试中是否遇到过这个题? Yes 给出n个物品的体积A[i]和其价值V 阅读全文
posted @ 2017-08-25 20:27 immjc 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 在n个物品中挑选若干物品装入背包,最多能装多满?假设背包的大小为m,每个物品的大小为A[i] 注意事项 你不可以将物品进行切割。 在n个物品中挑选若干物品装入背包,最多能装多满?假设背包的大小为m,每个物品的大小为A[i] 注意事项 你不可以将物品进行切割。 在n个物品中挑选若干物品装入背包,最多能 阅读全文
posted @ 2017-08-25 16:40 immjc 阅读(133) 评论(0) 推荐(0) 编辑
摘要: You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you nee 阅读全文
posted @ 2017-08-25 13:26 immjc 阅读(126) 评论(0) 推荐(0) 编辑
摘要: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo 阅读全文
posted @ 2017-08-23 17:13 immjc 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia 阅读全文
posted @ 2017-08-23 14:59 immjc 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Given an array and a value, remove all instances of that value in place and return the new length. Do not allocate extra space for another array, you 阅读全文
posted @ 2017-08-23 14:18 immjc 阅读(129) 评论(0) 推荐(0) 编辑
摘要: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 此题为两个链表的 阅读全文
posted @ 2017-08-22 22:28 immjc 阅读(93) 评论(0) 推荐(0) 编辑
摘要: Write a SQL query to find all duplicate emails in a table named Person. For example, your query should return the following for the above table: Note: 阅读全文
posted @ 2017-08-22 21:05 immjc 阅读(109) 评论(0) 推荐(0) 编辑
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 37 下一页