Skip to content
#

Algorithm

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

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

leetcode
liavkoren
liavkoren commented Mar 1, 2018
    def test_two_sum(self):
        solution = Solution()
        assert_raises(TypeError, solution.two_sum, None, None)
        assert_raises(ValueError, solution.two_sum, [], 0)
        target = 7
        nums = [1, 3, 2, -7, 5]
        expected = [2, 4]
        assert_equal(solution.two_sum(nums, target), expected)
        print('Success: test_two_sum')

[4, 2] should also

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.

williamfiset
williamfiset commented Apr 1, 2020

From a comment I got on YouTube that needs investigation:

"If the graph has 3 nodes - 0, 1, 2 and the indegree and outdegree of all the nodes are 0. Then, there is an empty Eulerian path, but the code results in "0". Do you think findStartNode() can be enhanced to handle this edge case?"

Relevant Videos:

Euler path/circuit existence: https://youtu.be/xR4sGgwtR2I
Euler path/circuit algori

Wikipedia
Wikipedia
You can’t perform that action at this time.