V
主页
[转载] Functional Pearl_ 最多超車次數|FunTh
发布人
https://youtu.be/C2r3LKo5waU 把問題用最直觀的方法寫下來,然後利用等式推論,發現有趣的演算法。這個過程稱做「程式推導」,是函數語言的有趣特色之一。 考慮這個問題:在一個數值串列中,如果一個數字 x 小於在它右側的任一個數字 y, 我們說 x 被 y 「超車」了。例如,在 [6,4,5,1,8,7] 中,5 被兩個數字超車(8,7), 4 被三個數字超車(5,8,7). 給定一個串列,如何算出「被超車最多次的元素,究竟被超了多少次車」? 這個問題可寫成一行 Haskell 程式。 本問題出現在 Richard Bird 的 Pearls of Functional Algorithm Design 中。這次的 Functional Thursday, 我們由那一行定義出發,利用等式推論,做出一個 O(n log n) 的演算法。 转载自:https://youtu.be/C2r3LKo5waU
打开封面
下载高清视频
观看高清视频
视频下载器
Nix & NixOS_函数式软件部署的理论实践|FunTh#76
避免 Python OOP 中的这些不良做法
Google Chrome Developer Tools Crash Course(p4)
JavaScript高阶函数(p9)
Bootstrap Beginner Crash Course(p1)
Responsive Bootstrap Website Start To Finish with Bootstrap 4, HTML5 & CSS3(p2)
JavaScript DOM Crash Course - Part 1(p5)
D3.js科学绘图(p11)
Tensorflow.js机器学习教程(p12-2) - Basic TensorFlow.js Web App
Python贪吃蛇魔改大赛|桌面彩虹蛇游戏
Rest API前端教程(p9)
JavaScript异步编程(p8)
Rest API后端教程(p10) Full Stack React & Django
Rest API后端教程(p10) Node.js Express & MongoDB
你是不是很想开学了??????#计算机 #编程 #学习