冒泡排序(Bubble Sort)是一种简单的排序算法。它重复地走访过要排序的数列,一次比较两个元素,如果顺序错误就将它们交换位置。
LeetCode 3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb"
, the answer is "abc"
, which the length is 3.
Given "bbbbb"
, the answer is “b”, with the length of 1.
Given "pwwkew"
, the answer is "wke"
, with the length of 3. Note that the answer must be a substring, "pwke"
is a subsequence and not a substring.
LeetCode 2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the number 0 itself.
Input: (2 -> 4 -> 3) + (5 -> 6 -> 4)
Output: 7 -> 0 -> 8
LeetCode 1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
1 | Given nums = [2, 7, 11, 15], target = 9, |
Scikit-learn 简介:基于神经元的 Iris 数据分类
Scikit-learn 的名字源于 SciKit(SciPy Toolkit),即 SciPy 的第三方扩展工具包。经过历年的发展,Scikit-learn 已成为最流行的机器学习库之一。
本文以 Iris 数据集的分类为例,对其进行简介。
Adaline 和梯度下降法
本文介绍了基于梯度下降法(Gradient Descent,GD)的自适应线性神经元(Adaptive Linear Neuron,Adaline),以及对应的算法实现。
Python NumPy 入门教程
本文是 Python 科学计算库numpy
、scipy
及matplotlib
的快速入门教程,翻译自斯坦福大学 CS231n - Python NumPy Tutorial 。