Skip to content
#

Algorithm

Algorithms are detailed sets of guidelines created for a computer program to complete tasks efficiently and thoroughly.

Here are 8,156 public repositories matching this topic...

javascript-algorithms
leetcode
azl397985856
azl397985856 commented Mar 19, 2020

ๆœ‰ไธ€ๅน…ไปฅไบŒ็ปดๆ•ดๆ•ฐๆ•ฐ็ป„่กจ็คบ็š„ๅ›พ็”ป๏ผŒๆฏไธ€ไธชๆ•ดๆ•ฐ่กจ็คบ่ฏฅๅ›พ็”ป็š„ๅƒ็ด ๅ€ผๅคงๅฐ๏ผŒๆ•ฐๅ€ผๅœจ 0 ๅˆฐ 65535 ไน‹้—ดใ€‚

็ป™ไฝ ไธ€ไธชๅๆ ‡ (sr, sc) ่กจ็คบๅ›พๅƒๆธฒๆŸ“ๅผ€ๅง‹็š„ๅƒ็ด ๅ€ผ๏ผˆ่กŒ ๏ผŒๅˆ—๏ผ‰ๅ’Œไธ€ไธชๆ–ฐ็š„้ขœ่‰ฒๅ€ผ newColor๏ผŒ่ฎฉไฝ ้‡ๆ–ฐไธŠ่‰ฒ่ฟ™ๅน…ๅ›พๅƒใ€‚

ไธบไบ†ๅฎŒๆˆไธŠ่‰ฒๅทฅไฝœ๏ผŒไปŽๅˆๅง‹ๅๆ ‡ๅผ€ๅง‹๏ผŒ่ฎฐๅฝ•ๅˆๅง‹ๅๆ ‡็š„ไธŠไธ‹ๅทฆๅณๅ››ไธชๆ–นๅ‘ไธŠๅƒ็ด ๅ€ผไธŽๅˆๅง‹ๅๆ ‡็›ธๅŒ็š„็›ธ่ฟžๅƒ็ด ็‚น๏ผŒๆŽฅ็€ๅ†่ฎฐๅฝ•่ฟ™ๅ››ไธชๆ–นๅ‘ไธŠ็ฌฆๅˆๆกไปถ็š„ๅƒ็ด ็‚นไธŽไป–ไปฌๅฏนๅบ”ๅ››ไธชๆ–นๅ‘ไธŠๅƒ็ด ๅ€ผไธŽๅˆๅง‹ๅๆ ‡็›ธๅŒ็š„็›ธ่ฟžๅƒ็ด ็‚น๏ผŒโ€ฆโ€ฆ๏ผŒ้‡ๅค่ฏฅ่ฟ‡็จ‹ใ€‚ๅฐ†ๆ‰€ๆœ‰ๆœ‰่ฎฐๅฝ•็š„ๅƒ็ด ็‚น็š„้ขœ่‰ฒๅ€ผๆ”นไธบๆ–ฐ็š„้ขœ่‰ฒๅ€ผใ€‚

ๆœ€ๅŽ่ฟ”ๅ›ž็ป่ฟ‡ไธŠ่‰ฒๆธฒๆŸ“ๅŽ็š„ๅ›พๅƒใ€‚

็คบไพ‹ 1:

่พ“ๅ…ฅ:
image = [[1,1,1],[1,1,0],[1,0,1]]
sr = 1, sc = 1, newColor = 2
่พ“ๅ‡บ: [[2,2,2],[2,2,0],[2,0,1]]
่งฃๆž:
ๅœจๅ›พๅƒ็š„ๆญฃไธญ้—ด๏ผŒ(ๅๆ ‡(

wnesensohn
wnesensohn commented May 23, 2016

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
TheSuperNoob
TheSuperNoob commented Mar 2, 2020

Is there a reason why in travis CI config the command black --check . || true is run? I don't see the point in checking if files needs to be reformatted if it's just going to be ignored anyways.

Currently running black --line-length 127 --check . -> 399 files would be reformatted, 74 files would be left unchanged.

In additio

homemade-machine-learning
alqbib
alqbib commented Mar 31, 2019

Vectorized version of gradient descent.

theta = theta * reg_param - alpha * (1 / num_examples) * (delta.T @ self.data).T

We should NOT regularize the parameter theta_zero.

theta[0] = theta[0] - alpha * (1 / num_examples) * (self.data[:, 0].T @ delta).T

the first code line ,theta include theta[0].
so I think can write like this:
theta[0] -= alpha * (1 / num_examples) * (self.data[:, 0].

๐Ÿ“š C/C++ ๆŠ€ๆœฏ้ข่ฏ•ๅŸบ็ก€็Ÿฅ่ฏ†ๆ€ป็ป“๏ผŒๅŒ…ๆ‹ฌ่ฏญ่จ€ใ€็จ‹ๅบๅบ“ใ€ๆ•ฐๆฎ็ป“ๆž„ใ€็ฎ—ๆณ•ใ€็ณป็ปŸใ€็ฝ‘็ปœใ€้“พๆŽฅ่ฃ…่ฝฝๅบ“็ญ‰็Ÿฅ่ฏ†ๅŠ้ข่ฏ•็ป้ชŒใ€ๆ‹›่˜ใ€ๅ†…ๆŽจ็ญ‰ไฟกๆฏใ€‚This repository is a summary of the basic knowledge of recruiting job seekers and beginners in the direction of C/C++ technology, including language, program library, data structure, algorithm, system, network, link loading library, interview experience, recruitment, recommendation, etc.

  • Updated Apr 19, 2020
  • C++
c1887
c1887 commented Feb 20, 2020

Chapter number or note title: Chapter 0, Exercise 2, Footnote 24

Page number: 17

Error description: The footnote says "Ja, das ist das [...]maschine". However, the German language has 3 different articles (der, die das). In this particular case, you want "die" instead of "das" [...]maschine.

Suggested fix (if any):
Ja, das ist die Subatomar[...]maschine.

BitYog
BitYog commented Nov 30, 2017

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

auphofBSF
auphofBSF commented Aug 21, 2019

A more consistent and multi-functional global level of verbosity control,
suggest an enhancement that will see print(...) in project be converted to using the python logging. module

import logging
#Then instead of print() use either
logging.info(......)
#or
logging.debug(.....)
#or
logging.warning(....)
#or
#logging.error()

In that way verbosity can be globally

Wikipedia
Wikipedia
You canโ€™t perform that action at this time.