Hello 算法 1.2.0 繁体中文 Java 版Hello 演算法 Java 語言版 作者:靳宇棟(@krahets) 程式碼審閱:靳宇棟(@krahets) Release 1.2.0 2024‑12‑06 序 兩年前,我在力扣上分享了“劍指 Offer”系列題解,受到了許多讀者的鼓勵與支持。在與讀者交流期間,我 最常被問到的一個問題是“如何入門演算法”。漸漸地,我對這個問題產生了濃厚的興趣。 兩眼一抹黑地刷題似乎是最受歡迎的方 記錄。需要注意的是,Python 中 range(a, b) 對應的區間是“左閉右開”的,對應的走訪範圍為 ?, ? + 1, … , ? − 1 : // === File: iteration.java === /* for 迴圈 */ int forLoop(int n) { int res = 0; // 迴圈求和 1, 2, ..., n-1, n for (int i = 1; 迴圈中,程式每輪都會先檢查條件,如果條 件為真,則繼續執行,否則就結束迴圈。 下面我們用 while 迴圈來實現求和 1 + 2 + ⋯ + ? : // === File: iteration.java === /* while 迴圈 */ int whileLoop(int n) { int res = 0; int i = 1; // 初始化條件變數 // 迴圈求和 1, 2, .0 码力 | 379 页 | 18.79 MB | 10 月前3
Hello 算法 1.2.0 简体中文 Java 版Hello 算法 Java 语言版 作者:靳宇栋(@krahets) 代码审阅:靳宇栋(@krahets) Release 1.2.0 2024‑12‑06 序 两年前,我在力扣上分享了“剑指 Offer”系列题解,受到了许多读者的鼓励和支持。在与读者交流期间,我 最常被问的一个问题是“如何入门算法”。逐渐地,我对这个问题产生了浓厚的兴趣。 两眼一抹黑地刷题似乎是最受欢迎的方法,简单 记录。需要注意的是,Python 中 range(a, b) 对应的区间是“左闭右开”的,对应的遍历范围为 ?, ? + 1, … , ? − 1 : // === File: iteration.java === /* for 循环 */ int forLoop(int n) { int res = 0; // 循环求和 1, 2, ..., n-1, n for (int i = 1; 循环中,程序每轮都会先检查条件,如果条 件为真,则继续执行,否则就结束循环。 下面我们用 while 循环来实现求和 1 + 2 + ⋯ + ? : // === File: iteration.java === /* while 循环 */ int whileLoop(int n) { int res = 0; int i = 1; // 初始化条件变量 // 循环求和 1, 2, .0 码力 | 379 页 | 18.48 MB | 10 月前3
Service Mesh 微服务架构设计模式:单体模式 类型:互联网金融 模式:微服务模式Java版本演进史 JDK J2ME J2SE J2EE Java SE 2004年 Java SE 5.0 2006年 Java SE 6.0 2011年 Java SE 7.0 2014年 Java SE 8.0 2017年 Java SE 9.0 2018年 Java SE 10 Java SE 11应用架构演进史 C/S0 码力 | 36 页 | 26.53 MB | 6 月前3
A Long Journey of Changing std::sort Implementation at Scalerolled out in LLVM 17 in -D_LIBCPP_DEBUG_STRICT_WEAK_ORDERING_CHECK -D_LIBCPP_ENABLE_DEBUG_MODE=1 7e1ee1 57It took us around to fix everything 6-7 months 58BUGS 59We found fewer of them but more dangerous for standard sorting is unstable Python, Rust, Java have stable default sorts 73.2SOME THOUGHTS Default for standard sorting is unstable Python, Rust, Java have stable default sorts Why do we have std::sort if comparator is broken? 73.3SOME THOUGHTS Default for standard sorting is unstable Python, Rust, Java have stable default sorts Why do we have std::sort that can read OOB even if comparator is broken0 码力 | 182 页 | 7.65 MB | 6 月前3
TiDB v8.5 Documentation· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 153 4.3.1 Java · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 2278 12.5.2 Best Practices for Developing Java Applications with TiDB · · · · · · · · · · 2286 12.5.3 Best Practices for Using HAProxy in TiDB· modify the sql_mode in TiDB?· · · · · · · · · · · · · · · · · · · · · · · · · · 5254 15.3.12 Error: java.sql.BatchUpdateException:statement count 5001 exceeds the transaction limitation while using Sqoop0 码力 | 6730 页 | 111.36 MB | 10 月前3
TiDB v8.3 Documentation· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 126 4.3.1 Java · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 1861 12.5.2 Best Practices for Developing Java Applications with TiDB · · · · · · · · · · 1869 12.5.3 Best Practices for Using HAProxy in TiDB· modify the sql_mode in TiDB?· · · · · · · · · · · · · · · · · · · · · · · · · · 5181 15.3.12 Error: java.sql.BatchUpdateException:statement count 5001 exceeds the transaction limitation while using Sqoop0 码力 | 6606 页 | 109.48 MB | 10 月前3
TiDB v8.4 Documentation· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 148 4.3.1 Java · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 1975 12.5.2 Best Practices for Developing Java Applications with TiDB · · · · · · · · · · 1983 12.5.3 Best Practices for Using HAProxy in TiDB· modify the sql_mode in TiDB?· · · · · · · · · · · · · · · · · · · · · · · · · · 5233 15.3.12 Error: java.sql.BatchUpdateException:statement count 5001 exceeds the transaction limitation while using Sqoop0 码力 | 6705 页 | 110.86 MB | 10 月前3
Julia 1.10.7 Documentationargument, you should declare the type as AbstractString in order to accept any string type. • Like C and Java, but unlike most dynamic languages, Julia has a first-class type for representing a single character type that can represent any Unicode character (and which is based on the UTF-8 encoding). • As in Java, strings are immutable: the value of an AbstractString object cannot be changed. To construct a different uation in Julia, as outlined in the next section. Unlike C, MATLAB, Perl, Python, and Ruby – but like Java, and a few other stricter, typed languages – it is an error if the value of a conditional expression0 码力 | 1691 页 | 6.34 MB | 10 月前3
Julia 1.10.6 Documentationargument, you should declare the type as AbstractString in order to accept any string type. • Like C and Java, but unlike most dynamic languages, Julia has a first-class type for representing a single character type that can represent any Unicode character (and which is based on the UTF-8 encoding). • As in Java, strings are immutable: the value of an AbstractString object cannot be changed. To construct a different uation in Julia, as outlined in the next section. Unlike C, MATLAB, Perl, Python, and Ruby – but like Java, and a few other stricter, typed languages – it is an error if the value of a conditional expression0 码力 | 1691 页 | 6.33 MB | 10 月前3
julia 1.10.8 documentationargument, you should declare the type as AbstractString in order to accept any string type. • Like C and Java, but unlike most dynamic languages, Julia has a first-class type for representing a single character type that can represent any Unicode character (and which is based on the UTF-8 encoding). • As in Java, strings are immutable: the value of an AbstractString object cannot be changed. To construct a different uation in Julia, as outlined in the next section. Unlike C, MATLAB, Perl, Python, and Ruby – but like Java, and a few other stricter, typed languages – it is an error if the value of a conditional expression0 码力 | 1692 页 | 6.34 MB | 8 月前3
共 205 条
- 1
- 2
- 3
- 4
- 5
- 6
- 21













