# 14. Longest Common Prefix-python

Write a function to find the longest common prefix string amongst an array of strings.思路 随机选取一个字符作为最长公共前缀 遍历这个前缀的每个字符 若所有的字符串都含有这个字符，则最长公共前缀指针前进1 Codeclass Solution(object): def longestCommonPrefix...

# 12. Integer to Roman-python

Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.Codeclass Solution(object): def intToRoman(self, num): """ :type num: int...

# python-list与set相互转换时的一个注意事项

list初始化，里面的元素是set，n1={"","I","II","III","IV","V","VI","VII","VIII","IX"} #1~9 n10={"","X","XX","XXX","XL","L","LX","LXX","LXXX","XC"} #10~90 n100={"","C","CC","CCC","CD","D","DC","DCC","DCCC","CM"} #10...

# python与C, C++,C#一个计算精度的区别

python计算精度问题，如下所示，会自动保留精度 但在C, C++,C#中情况就不尽然，是的结果为01/(Math.Pow(10,3) = 0...

# 9. Palindrome Number-python

Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints: Could negative integers be palindromes? (ie, -1)If you are thinking of converting the intege...

# 7. Reverse Integer-python

Reverse digits of an integer.Example1: x = 123, return 321 Example2: x = -123, return -321Note: The input is assumed to be a 32-bit signed integer. Your function should return 0 when the reversed integ...

# 4. Median of Two Sorted Arrays-python

There are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).Example 1: nums1 = [1, 3] nums2...

# 3.Longest Substring Without Repeating Characters-python

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 le...

# 1. Two Sum-python

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 ele...

# 入门-神经元模型，感知机与多层网络

M-P模型1943年，McCulloch and Pitts抽象出了“M-P神经元模型”，神经元接受到来自nn个其他神经元传递过来的输入信号，通过带权重的值连接传递，神经元接受到的总输入值与神经元的阈值进行比较，通过激活函数（activation function）处理输出。激活函数理想中的激活函数如下图所示的阶跃函数，它将输入值映射为输出值0 （对应于神经元抑制）或 1（对应于神经元兴奋）。...

# Linux-ubuntu常用最基本命令

bash bash是最常见的Shell，全名为 Bourne Again Shell。 xiaoming@computername:~\$ @之前的，是当前用户的用户名； @后面，“：”前面是计算机名； “：”后面，是当前所在目录； 在“\$”后面可以输入命令。 echo \$PATH 运行这个命令，可以查看环境变量PATH到底是什么。 man ifconfig 需要帮助...

# python-基础结构

46条 共3页1 2 3 下一页 尾页
算法channel

交流思想，注重分析，实例阐述，通俗易懂，包含但不限于：经典算法，机器学习，深度学习，LeetCode 题解，Kaggle 实战。期待您的到来！

算法与人工智能交流群：646901659

个人资料
• 访问：297312次
• 积分：7372
• 等级：
• 排名：第3198名
• 原创：351篇
• 转载：0篇
• 译文：0篇
• 评论：55条
博客专栏
 从C++/C#入门到python 文章：11篇 阅读：10328
 SVNAndGit 文章：7篇 阅读：25104