Hello 算法 1.2.0 繁体中文 Kotlin 版Hello 演算法 Kotlin 語言版 作者:靳宇棟(@krahets) 程式碼審閱:陳東輝(@curtishd) Release 1.2.0 2024‑12‑06 序 兩年前,我在力扣上分享了“劍指 Offer”系列題解,受到了許多讀者的鼓勵與支持。在與讀者交流期間,我 最常被問到的一個問題是“如何入門演算法”。漸漸地,我對這個問題產生了濃厚的興趣。 兩眼一抹黑地刷題似乎是最受歡 . 11 1.2 演算法是什麼 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.3 小結 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 第 2 章 複雜度分析 的實 現。 約定俗成的簡稱 在實際討論時,我們通常會將“資料結構與演算法”簡稱為“演算法”。比如眾所周知的 LeetCode 演 算法題目,實際上同時考查資料結構和演算法兩方面的知識。 1.3 小結 ‧ 演算法在日常生活中無處不在,並不是遙不可及的高深知識。實際上,我們已經在不知不覺中學會了許 多演算法,用以解決生活中的大小問題。 ‧ 查字典的原理與二分搜尋演算法相一致。二分搜尋演算法體現了分而治之的重要演算法思想。0 码力 | 382 页 | 18.79 MB | 10 月前3
Debian 新維護人員手冊. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 開發時需要的文檔 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . make)的文檔,至少瞭解其一般的用途和用法。現在看來這是一項耗時巨大的任務,但在接下 來的工作中你將爲你閱讀了它們而感覺到 非常愉快。如果一會你遇到一些特定的問題,我會建議你重新閱讀上面提到 的文檔。 1.3 開發時需要的文檔 以下是 非常重要的文件,你應該在讀本文件時同時參考它們: • debian-policy - the Debian Policy Manual (http://www.debian 告和它們的許可證。對於常見的自由軟體許可 證,如 GNU GPL-1、GNU GPL-2、GNU GPL-3、LGPL-2、LGPL-2.1、LGPL-3、GNU FDL-1.2、GNU FDL-1.3、Apache- 2.0、3-Clause BSD、CC0-1.0、MPL-1.1、MPL-2.0 或 Artistic 許可證,你可以直接將其指向所有 Debian 系統都有的 /usr/share/common-licenses/0 码力 | 63 页 | 512.12 KB | 1 年前3
Julia 1.11.42 1.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Julia Compared to Other Languages . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 Getting else. Once you understand how Julia works, it is easy to write code that is nearly as fast as C. 1.3 Julia Compared to Other Languages Julia features optional typing, multiple dispatch, and good performance A = [1.3, -2.7, 4.4, 3.1]; julia> @ccall qsort(A::Ptr{Cdouble}, length(A)::Csize_t, sizeof(eltype(A))::Csize_t, mycompare_c::Ptr{Cvoid})::Cvoid �→ julia> A 4-element Vector{Float64}: -2.7 1.3 3.10 码力 | 2007 页 | 6.73 MB | 3 月前3
Julia 1.11.5 Documentation2 1.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Julia Compared to Other Languages . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 Getting else. Once you understand how Julia works, it is easy to write code that is nearly as fast as C. 1.3 Julia Compared to Other Languages Julia features optional typing, multiple dispatch, and good performance A = [1.3, -2.7, 4.4, 3.1]; julia> @ccall qsort(A::Ptr{Cdouble}, length(A)::Csize_t, sizeof(eltype(A))::Csize_t, mycompare_c::Ptr{Cvoid})::Cvoid �→ julia> A 4-element Vector{Float64}: -2.7 1.3 3.10 码力 | 2007 页 | 6.73 MB | 3 月前3
Julia 1.11.6 Release Notes2 1.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Julia Compared to Other Languages . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 Getting else. Once you understand how Julia works, it is easy to write code that is nearly as fast as C. 1.3 Julia Compared to Other Languages Julia features optional typing, multiple dispatch, and good performance A = [1.3, -2.7, 4.4, 3.1]; julia> @ccall qsort(A::Ptr{Cdouble}, length(A)::Csize_t, sizeof(eltype(A))::Csize_t, mycompare_c::Ptr{Cvoid})::Cvoid �→ julia> A 4-element Vector{Float64}: -2.7 1.3 3.10 码力 | 2007 页 | 6.73 MB | 3 月前3
julia 1.10.102 1.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Julia Compared to Other Languages . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 Getting else. Once you understand how Julia works, it is easy to write code that is nearly as fast as C. 1.3 Julia Compared to Other Languages Julia features optional typing, multiple dispatch, and good performance A = [1.3, -2.7, 4.4, 3.1]; julia> @ccall qsort(A::Ptr{Cdouble}, length(A)::Csize_t, sizeof(eltype(A))::Csize_t, mycompare_c::Ptr{Cvoid})::Cvoid �→ julia> A 4-element Vector{Float64}: -2.7 1.3 3.10 码力 | 1692 页 | 6.34 MB | 3 月前3
Julia 1.10.92 1.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Julia Compared to Other Languages . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 Getting else. Once you understand how Julia works, it is easy to write code that is nearly as fast as C. 1.3 Julia Compared to Other Languages Julia features optional typing, multiple dispatch, and good performance A = [1.3, -2.7, 4.4, 3.1]; julia> @ccall qsort(A::Ptr{Cdouble}, length(A)::Csize_t, sizeof(eltype(A))::Csize_t, mycompare_c::Ptr{Cvoid})::Cvoid �→ julia> A 4-element Vector{Float64}: -2.7 1.3 3.10 码力 | 1692 页 | 6.34 MB | 3 月前3
julia 1.13.0 DEV2 1.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Julia Compared to Other Languages . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 Getting else. Once you understand how Julia works, it is easy to write code that is nearly as fast as C. 1.3 Julia Compared to Other Languages Julia features optional typing, multiple dispatch, and good performance A = [1.3, -2.7, 4.4, 3.1]; julia> @ccall qsort(A::Ptr{Cdouble}, length(A)::Csize_t, sizeof(eltype(A))::Csize_t, mycompare_c::Ptr{Cvoid})::Cvoid �→ julia> A 4-element Vector{Float64}: -2.7 1.3 3.10 码力 | 2058 页 | 7.45 MB | 3 月前3
Julia 1.12.0 RC12 1.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Julia Compared to Other Languages . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 Getting else. Once you understand how Julia works, it is easy to write code that is nearly as fast as C. 1.3 Julia Compared to Other Languages Julia features optional typing, multiple dispatch, and good performance A = [1.3, -2.7, 4.4, 3.1]; julia> @ccall qsort(A::Ptr{Cdouble}, length(A)::Csize_t, sizeof(eltype(A))::Csize_t, mycompare_c::Ptr{Cvoid})::Cvoid �→ julia> A 4-element Vector{Float64}: -2.7 1.3 3.10 码力 | 2057 页 | 7.44 MB | 3 月前3
Julia 1.12.0 Beta42 1.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Julia Compared to Other Languages . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 Getting else. Once you understand how Julia works, it is easy to write code that is nearly as fast as C. 1.3 Julia Compared to Other Languages Julia features optional typing, multiple dispatch, and good performance A = [1.3, -2.7, 4.4, 3.1]; julia> @ccall qsort(A::Ptr{Cdouble}, length(A)::Csize_t, sizeof(eltype(A))::Csize_t, mycompare_c::Ptr{Cvoid})::Cvoid �→ julia> A 4-element Vector{Float64}: -2.7 1.3 3.10 码力 | 2057 页 | 7.44 MB | 3 月前3
共 36 条
- 1
- 2
- 3
- 4













