Hello 算法 1.2.0 繁体中文 C++ 版Hello 演算法 C++ 語言版 作者:靳宇棟(@krahets) 程式碼審閱:宮蘭景(@Gonglja) Release 1.2.0 2024‑12‑06 序 兩年前,我在力扣上分享了“劍指 Offer”系列題解,受到了許多讀者的鼓勵與支持。在與讀者交流期間,我 最常被問到的一個問題是“如何入門演算法”。漸漸地,我對這個問題產生了濃厚的興趣。 兩眼一抹黑地刷題似乎是最受歡迎的方法 和 ?(2?) 等。 2. Q & A Q:尾遞迴的空間複雜度是 ?(1) 嗎? 理論上,尾遞迴函式的空間複雜度可以最佳化至 ?(1) 。不過絕大多數程式語言(例如 Java、Python、C++、 Go、C# 等)不支持自動最佳化尾遞迴,因此通常認為空間複雜度是 ?(?) 。 Q:函式和方法這兩個術語的區別是什麼? 函式(function)可以被獨立執行,所有參數都以顯式傳遞。方法( 他程式語言中的方法。 ‧ Java 和 C# 是物件導向的程式語言,程式碼塊(方法)通常作為某個類別的一部分。靜態方法的行為類 似於函式,因為它被繫結在類別上,不能訪問特定的例項變數。 ‧ C++ 和 Python 既支持程序式程式設計(函式),也支持物件導向程式設計(方法)。 Q:圖解“常見的空間複雜度型別”反映的是否是佔用空間的絕對大小? 不是,該圖展示的是空間複雜度,其反映的是增長趨勢,而不是佔用空間的絕對大小。0 码力 | 379 页 | 18.79 MB | 10 月前3
julia 1.10.10More About Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 27.18 C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 28 Handling Python . . . . . . . . . . . . . . . . . . . . . . . . . . 483 38.4 Noteworthy differences from C/C++ . . . . . . . . . . . . . . . . . . . . . . . . . . 485 38.5 Noteworthy differences from Common Lisp dynamic languages for these applications, and we do not expect their use to diminish. Fortunately, modern language design and compiler techniques make it possible to mostly eliminate the performance trade-off0 码力 | 1692 页 | 6.34 MB | 3 月前3
Julia 1.10.9More About Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 27.18 C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 28 Handling Python . . . . . . . . . . . . . . . . . . . . . . . . . . 483 38.4 Noteworthy differences from C/C++ . . . . . . . . . . . . . . . . . . . . . . . . . . 485 38.5 Noteworthy differences from Common Lisp dynamic languages for these applications, and we do not expect their use to diminish. Fortunately, modern language design and compiler techniques make it possible to mostly eliminate the performance trade-off0 码力 | 1692 页 | 6.34 MB | 3 月前3
Julia 1.11.5 DocumentationMore About Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 28.18 C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 29 Handling Python . . . . . . . . . . . . . . . . . . . . . . . . . . 518 39.4 Noteworthy differences from C/C++ . . . . . . . . . . . . . . . . . . . . . . . . . . 521 39.5 Noteworthy differences from Common Lisp dynamic languages for these applications, and we do not expect their use to diminish. Fortunately, modern language design and compiler techniques make it possible to mostly eliminate the performance trade-off0 码力 | 2007 页 | 6.73 MB | 3 月前3
Julia 1.11.6 Release NotesMore About Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 28.18 C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 29 Handling Python . . . . . . . . . . . . . . . . . . . . . . . . . . 518 39.4 Noteworthy differences from C/C++ . . . . . . . . . . . . . . . . . . . . . . . . . . 521 39.5 Noteworthy differences from Common Lisp dynamic languages for these applications, and we do not expect their use to diminish. Fortunately, modern language design and compiler techniques make it possible to mostly eliminate the performance trade-off0 码力 | 2007 页 | 6.73 MB | 3 月前3
Julia 1.11.4More About Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 28.18 C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 29 Handling Python . . . . . . . . . . . . . . . . . . . . . . . . . . 518 39.4 Noteworthy differences from C/C++ . . . . . . . . . . . . . . . . . . . . . . . . . . 521 39.5 Noteworthy differences from Common Lisp dynamic languages for these applications, and we do not expect their use to diminish. Fortunately, modern language design and compiler techniques make it possible to mostly eliminate the performance trade-off0 码力 | 2007 页 | 6.73 MB | 3 月前3
julia 1.13.0 DEVMore About Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388 28.18 C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388 29 Handling Python . . . . . . . . . . . . . . . . . . . . . . . . . . 529 39.4 Noteworthy differences from C/C++ . . . . . . . . . . . . . . . . . . . . . . . . . . 532 39.5 Noteworthy differences from Common Lisp dynamic languages for these applications, and we do not expect their use to diminish. Fortunately, modern language design and compiler techniques make it possible to mostly eliminate the performance trade-off0 码力 | 2058 页 | 7.45 MB | 3 月前3
Julia 1.12.0 RC1More About Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389 28.18 C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389 29 Handling Python . . . . . . . . . . . . . . . . . . . . . . . . . . 530 39.4 Noteworthy differences from C/C++ . . . . . . . . . . . . . . . . . . . . . . . . . . 533 39.5 Noteworthy differences from Common Lisp dynamic languages for these applications, and we do not expect their use to diminish. Fortunately, modern language design and compiler techniques make it possible to mostly eliminate the performance trade-off0 码力 | 2057 页 | 7.44 MB | 3 月前3
Julia 1.12.0 Beta4More About Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388 28.18 C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388 29 Handling Python . . . . . . . . . . . . . . . . . . . . . . . . . . 529 39.4 Noteworthy differences from C/C++ . . . . . . . . . . . . . . . . . . . . . . . . . . 532 39.5 Noteworthy differences from Common Lisp dynamic languages for these applications, and we do not expect their use to diminish. Fortunately, modern language design and compiler techniques make it possible to mostly eliminate the performance trade-off0 码力 | 2057 页 | 7.44 MB | 3 月前3
Julia 1.12.0 Beta3More About Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388 28.18 C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388 29 Handling Python . . . . . . . . . . . . . . . . . . . . . . . . . . 529 39.4 Noteworthy differences from C/C++ . . . . . . . . . . . . . . . . . . . . . . . . . . 532 39.5 Noteworthy differences from Common Lisp dynamic languages for these applications, and we do not expect their use to diminish. Fortunately, modern language design and compiler techniques make it possible to mostly eliminate the performance trade-off0 码力 | 2057 页 | 7.44 MB | 3 月前3
共 37 条
- 1
- 2
- 3
- 4













