上一页 1 ··· 5 6 7 8 9 10 下一页
摘要: Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the dept 阅读全文
posted @ 2017-12-05 15:57 Zzz...y 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 关于粒子群优化算法(PSO)的解释:http://blog.csdn.net/myarrow/article/details/51507671 (等网上各种参考资料) 用PSO找函数极值。 构造了一个二元函数,很明显,有极小值,在(50, 50)。 用五个粒子去找。每个点对应的函数输出值即视为粒子的 阅读全文
posted @ 2017-12-04 17:22 Zzz...y 阅读(1262) 评论(0) 推荐(0) 编辑
摘要: There is a brick wall in front of you. The wall is rectangular and has several rows of bricks. The bricks have the same height but different width. Yo 阅读全文
posted @ 2017-12-04 15:21 Zzz...y 阅读(483) 评论(0) 推荐(0) 编辑
摘要: We are given an array asteroids of integers representing asteroids in a row. For each asteroid, the absolute value represents its size, and the sign r 阅读全文
posted @ 2017-12-01 17:37 Zzz...y 阅读(387) 评论(0) 推荐(0) 编辑
摘要: Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Supposed the linked list is 1 -> 2 -> 3 - 阅读全文
posted @ 2017-11-30 16:53 Zzz...y 阅读(132) 评论(0) 推荐(0) 编辑
摘要: Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. This 阅读全文
posted @ 2017-11-29 20:56 Zzz...y 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example: 寻找最长回文字符串。 用动态规划。dp[i][j] 阅读全文
posted @ 2017-11-29 15:01 Zzz...y 阅读(125) 评论(0) 推荐(0) 编辑
摘要: Given a string, your task is to count how many palindromic substrings in this string. The substrings with different start indexes or end indexes are c 阅读全文
posted @ 2017-11-29 14:55 Zzz...y 阅读(162) 评论(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 unique BST' 阅读全文
posted @ 2017-11-29 14:48 Zzz...y 阅读(110) 评论(0) 推荐(0) 编辑
摘要: An image is represented by a 2-D array of integers, each integer representing the pixel value of the image (from 0 to 65535). Given a coordinate (sr, 阅读全文
posted @ 2017-11-28 17:55 Zzz...y 阅读(319) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 下一页