
算法
文章平均质量分 63
HustSupermen
这小号不要也罢
展开
-
计算某年某月的某一天是星期几的算法
说多了没意思,直接送上公式。 W = (Y-1) + [(Y-1)/4] - [(Y-1)/100] + [(Y-1)/400] + D Y:年 (年份后两位数) D:是这个日子在这一年中的累积天数 求出W后,在对7原创 2017-03-26 11:24:52 · 7088 阅读 · 1 评论 -
常见排序算法-Python实现
常见排序算法-Python实现python排序算法1.二分法 python 32行ortant; font-family: monospace; white-space: pre;" >#coding=utf-8 def binary_search(input_array, value): """Your code goes here.""" length = le原创 2017-03-26 11:28:06 · 286 阅读 · 0 评论