- 博客(8)
- 收藏
- 关注
原创 LeetCode6 Kth Largest Element in an Array
1、题目描述 Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For example, Given [3,2,1,5,6,4] and k = 2, return
2017-03-26 11:40:59 292
原创 Leetcode5 Rotate Image
1、题目描述 You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).
2017-03-25 14:12:27 258
原创 Leetcode4 Spiral Matrix II
1、题目描述 Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.For example, Given n = 3,You should return the following matrix: [ [ 1, 2, 3 ], [ 8, 9, 4 ],
2017-03-19 22:23:43 279
原创 ABC算法
ABC(Artificial Bee Colony)算法,人工蜂群算法,是由Karaboga于2005年提出的一种新颖的基于群智能的全局优化算法,来源于蜂群的采蜜行为,蜜蜂根据各自的分工进行不同的活动,并实现蜂群信息的共享和交流,从而找到问题的最优解。人工蜂群算法属于群智能优化算法的一种。 该方法主要分为三个阶段:采蜜蜂发现新的蜜源、观察蜂根据采蜜蜂的蜜源寻找新的蜜源,侦查蜂寻找新的蜂源代替多次没
2017-03-16 16:16:02 8354 1
原创 LeetCode3 Search a 2D Matrix
LeetCode3 Search a 2D Matrix 1、题目描述 Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted from left to
2017-03-12 14:35:08 463
原创 优化算法之引力搜索算法
优化算法之引力搜索算法(gravitational search algorithm),主要是利用两物体之间的引力定律进行指导各个粒子的运动优化搜索最优解的,两个粒子之间的引力与两个粒子的质量成正比,与两粒子之间的距离成反比
2017-03-04 17:06:46 16897 2
原创 优化算法之萤火虫算法(firefly algorithm)
智能优化算法有很多是模仿自然界中的生物行为进行的,例如众所周知的粒子群算法、遗传算法等,最近新看到一种算法,萤火虫优化算法(firefly algorithm)。
2017-03-03 22:08:57 27471 7
原创 LeetCode 2 Remove Element
1、题目描述 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 must do this in place with constant memory.T
2017-03-03 17:10:18 249
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人