-
Updated
Feb 23, 2020
Algorithm
Algorithms are detailed sets of guidelines created for a computer program to complete tasks efficiently and thoroughly.
Here are 7,783 public repositories matching this topic...
-
Updated
Feb 23, 2020 - Java
I think it makes more sense to return an empty array
// invalid input return null or throw an error
if (!setA || !setB) {
return null;
}
if (!setA.length || !setB.length) {
return [];
}
// or do nothing since the for loop will not trigger anyway
- We have BFS and DFS images in both Breadth First Traversal and Depth First Traversal. We should have illustrations in the respective sections.
Hey Yangshun,
Thanks for the great list of guides!
I found the explanation for Snake game bit difficult to follow and I came across this interesting and better explanantion here https://www.youtube.com/watch?v=AaGK-fj-BAM
Selection Sort, for example, makes the algorithm look extremely (impossibly) good at first glance - O(n) - because it's not showing the majority of the steps.
Instead of
for (var j = i + 1; j < D.length; j++) {
if (D[j] < D[minJ]) {
tracer._select(j);
minJ = j;
tracer._deselect(j);
}
}
it has to be more like
for (var j
假如有一排房子,共 n 个,每个房子可以被粉刷成红色、蓝色或者绿色这三种颜色中的一种,你需要粉刷所有的房子并且使其相邻的两个房子颜色不能相同。
当然,因为市场上不同颜色油漆的价格不同,所以房子粉刷成不同颜色的花费成本也是不同的。每个房子粉刷成不同颜色的花费是以一个 n x 3 的矩阵来表示的。
例如,costs[0][0] 表示第 0 号房子粉刷成红色的成本花费;costs[1][2] 表示第 1 号房子粉刷成绿色的花费,以此类推。请你计算出粉刷完所有房子最少的花费成本。
注意:
所有花费均为正整数。
示例:
输入: [[17,2,17],[16,16,5],[14,3,19]]
输出: 10
解释: 将 0 号房子粉刷成蓝色,1 号房子粉刷成绿色,2 号房子粉刷成蓝色。
最少花费: 2 + 5 + 3 = 10。
题目地址: ht
-
Updated
Feb 23, 2020 - Java
https://mybinder.org/ Should I make a binder ? :) Or if there is a binder link, it's well hidden.
Add Documentation
This is an extension of issue #264
To prepare for packaging, we need to properly explain how api works in our documentation.
-
Updated
Feb 22, 2020 - C#
It may be good to provide pure Python implementation of Gradient Descent (instead of SciPy one) for Logistic Regression just for the learning purposes.
there is data_structures/src/list/singly_linked_list, but there is also a code for same problem in data_structures/linked_list/
One of them ought to be removed.
-
Updated
Feb 21, 2020 - Python
-
Updated
Feb 23, 2020 - C++
-
Updated
Feb 23, 2020 - Jupyter Notebook
-
Updated
Feb 23, 2020 - Java
Chapter number or note title: 1. Recursion
Page number: 26 (footnote)
Error description/Suggested fix (if any):
It should probably read "... a non-recursive variant..."
Hey @mgechev,
I noticed that you have a README.md file in src/sorting, which has the Big O complexity for all algorithms. It also has the "When to use" column, which is blank. Basecs already has many algorithms' explanations, and can be used to fill in this.column. The explanations are valid for most languages and are concise.
Also, a README.md for all src/* folders would be helpful. (I would
-
Updated
Feb 23, 2020 - HTML
🚀 Feature Proposal
Adding leading zero in the question number will be an awesome feature for file explorer to sort files by the name.
Here's a JSFiddle and a sample geojson.
Basically, if I have a LineString of length k, calling lineToPolygon(line) (which returns a "new" polygon) also mutates line to have k + 1 points. Of course, you can set the property autoComplete, but I would never expect lineToPolygon(line) to both return a Polygon
-
Updated
Feb 23, 2020 - Python
-
Updated
Feb 23, 2020 - C++
-
Updated
Feb 22, 2020 - Java
-
Updated
Feb 23, 2020 - C++
-
Updated
Feb 23, 2020 - Java
New popular data sets, techniques, research paper links are some of the suggested ways you can contribute.
- Wikipedia
- Wikipedia

There are some interesting algorithms in simulation from Physics, Chemistry, and Engineering especially regarding Monte Carlo simulation: Heat Bath algorithm, Metro-Police algorithm, Markov Chain Monte Carlo, etc.