#Hashmap
Day 22/90 Rust: a test passed on my laptop and failed in CI.

I iterated a HashMap and asserted on the output order. HashMap order is randomized per process by design, so the test was flaky from the start.

Fix was one word: HashMap to BTreeMap. Sorted, deterministic, CI green.

#Rust #RustLang
November 3, 2026 at 4:34 PM
So java has maps, and has maps, but hashmap extends from map but is also unmutable? What the hell
November 2, 2026 at 5:12 PM
Man why do LLMs love indirection so much? It’s addicted. Just write the thing directly! You don’t need a registry proxy class or whatever, just use a hashmap!!!
November 7, 2026 at 8:06 PM
E問題ちょっとしか考えれてないけど、M文字から2文字選んで'*'に置き換えて一致判定すればハミング距離が2以下かわかりそうで、あとはHashMapでどうにかなったりしない?
November 7, 2026 at 1:53 PM
Rust E0502/E0499: a function that returns a HashMap value or else inserts it fails on stable 1.99.1 and 1.100 beta, and compiles on nightly with the new Polonius borrow checker. On stable, use entry().
Fixing Rust's "cannot borrow as mutable" errors, E0502 and E0499
Rust cannot borrow as mutable errors E0502 and E0499, reproduced on 1.99.1: what the three labels mean and the fix for each of five common shapes.
importstatic.com
November 8, 2026 at 7:11 AM
Your HashMap Is a Linked List
In Java, a HashMap bucket is not just a slot. When keys collide, that bucket becomes a linked list — and after enough collisions, a tree. That’s why hashCode() and equals() decide both correctness and performance. 📚 Checkout Our Best Selling Interview Prep Books: Grokking the Java Interview - 📖 https://gumroad.com/l/QqjGH Grokking SpringBoot Interview - 📚 https://gumroad.com/l/hrUXKY Grokking the SQL Interview - 📊 https://bit.ly/3sur01w Grokking the Java Interview Part 2 - 📘 https://bit.ly/44aKlSs Grokking the Java SE 17 Developer Certification (1Z0-829 Exam) - 📜 https://javinpaul.gumroad.com/l/cyoph Spring Framework Practice Questions - 📝 https://javinpaul.gumroad.com/l/spring-practice-questions Practice System Design question - https://codemia.io/system-design/desi... Recommended System Design Interview Resources 1. ByteByteGo - https://bit.ly/3P3eqMN 2. Codemia - https://buff.ly/4dl3eHJ 3. DesignGuru - https://bit.ly/3pMiO8g 4. BugFree.ai - https://www.bugfree.ai/?via=javarevis... 5. Exponent - https://bit.ly/3cNF0vw 6. System Design School - https://systemdesignschool.io/?linkId... 7. Educative - https://bit.ly/3Mnh6UR 8. Udemy - https://trk.udemy.com/c/3294490/32621... 9. InterviewKickStart - https://upwardandonwardinc.sjv.io/RG2Aka 10. DDIA https://amzn.to/3nXKaas 11. System Design Interview - An insider's guide - https://amzn.to/3nU2Mbp 12. ZTM - https://bit.ly/3YpWu4q 13. AlgoMaster - https://buff.ly/4cmZOTB 14. System Design One - https://buff.ly/4ctkXvs 15. InterviewReddy - https://buff.ly/3VXt5in 16. free system design courses - https://bit.ly/3nqVdfl 17. Github - https://bit.ly/3bSaBfC 18. AlgoMonster - http://shrsl.com/483tt 19. Coursera - https://bit.ly/3BxMXzr 🌐 Checkout Our Other Social Channels: Substack - 📝 https://javarevisited.substack.com/ Twitter - 🐦 https://x.com/javarevisited Facebook - 📘 https://www.facebook.com/javarevisited Reddit - 👤 https://www.reddit.com/r/javarevisited/
www.youtube.com
November 3, 2026 at 11:13 PM
言うの忘れてたけど、配列の添字とデータの対応は辞書にして持っておかなあかんねん。
それがものすごいオーバーヘッドやから、これまでのプログラマーは思い付きもしなかったわけやね。
ただデータを持ってるだけでいいなら、辞書でいいし、木なんか要らんがな、と思ってたんやね。
そんなのただのHashMapでいい?
一応こっちは、データが小さい順で並んでるからね。取り出すのは速いよ。
November 8, 2026 at 2:15 PM
Your HashMap Is a Linked List
In Java, a HashMap bucket is not just a slot. When keys collide, that bucket becomes a linked list — and after enough collisions, a tree. That’s why hashCode() and equals() decide both correctness and performance. 📚 Checkout Our Best Selling Interview Prep Books: Grokking the Java Interview - 📖 https://gumroad.com/l/QqjGH Grokking SpringBoot Interview - 📚 https://gumroad.com/l/hrUXKY Grokking the SQL Interview - 📊 https://bit.ly/3sur01w Grokking the Java Interview Part 2 - 📘 https://bit.ly/44aKlSs Grokking the Java SE 17 Developer Certification (1Z0-829 Exam) - 📜 https://javinpaul.gumroad.com/l/cyoph Spring Framework Practice Questions - 📝 https://javinpaul.gumroad.com/l/spring-practice-questions Practice System Design question - https://codemia.io/system-design/desi... Recommended System Design Interview Resources 1. ByteByteGo - https://bit.ly/3P3eqMN 2. Codemia - https://buff.ly/4dl3eHJ 3. DesignGuru - https://bit.ly/3pMiO8g 4. BugFree.ai - https://www.bugfree.ai/?via=javarevis... 5. Exponent - https://bit.ly/3cNF0vw 6. System Design School - https://systemdesignschool.io/?linkId... 7. Educative - https://bit.ly/3Mnh6UR 8. Udemy - https://trk.udemy.com/c/3294490/32621... 9. InterviewKickStart - https://upwardandonwardinc.sjv.io/RG2Aka 10. DDIA https://amzn.to/3nXKaas 11. System Design Interview - An insider's guide - https://amzn.to/3nU2Mbp 12. ZTM - https://bit.ly/3YpWu4q 13. AlgoMaster - https://buff.ly/4cmZOTB 14. System Design One - https://buff.ly/4ctkXvs 15. InterviewReddy - https://buff.ly/3VXt5in 16. free system design courses - https://bit.ly/3nqVdfl 17. Github - https://bit.ly/3bSaBfC 18. AlgoMonster - http://shrsl.com/483tt 19. Coursera - https://bit.ly/3BxMXzr 🌐 Checkout Our Other Social Channels: Substack - 📝 https://javarevisited.substack.com/ Twitter - 🐦 https://x.com/javarevisited Facebook - 📘 https://www.facebook.com/javarevisited Reddit - 👤 https://www.reddit.com/r/javarevisited/
www.youtube.com
November 1, 2026 at 2:21 AM
same hashmap slot in my mind as We Are Charlie Kirk
October 27, 2026 at 10:32 PM
HashMap is much more than put() and get(). This replay covers collisions, Big O, hashCode(), and how key-value structures simplify interview problems.
youtu.be/kZnxBPLHwiU?...
#Java #JavaDeveloper
Java Key-Value Data Structures: Crack the Coding Interview - Live #17
The Key-Value data structure, most famously represented by Java's HashMap, is a secret weapon in any developer's toolkit. It has the power to transform compl...
youtu.be
October 30, 2026 at 4:00 PM
so this makes an immutable hashmap, but THIS somehow makes it mutable? what the fuck java
October 26, 2026 at 4:29 PM
i miss coding in rust. i would just have a let mut map = HashMap<> in the constructor. not this backwards ass programming language
October 26, 2026 at 4:30 PM
Multiple levels of detail are maintained in the spatial hashmap. Rendering falls back to a higher level if the target level doesn't have enough AO samples.
October 27, 2026 at 12:48 PM
変数の型だけでなく変数に入れられた値の型もわかるようにしたんだけど
dim a: any = 123
a = 'abc'
a = {n: 1}
function f(ref x)
x = EMPTY
fend
f(a)
などとやると場所によって型が変わってしまうのでこれどうしたもんですかね
位置と型のHashMap作ってどの行からどの形になる、がわかるようにしたほうがよいかしら
October 26, 2026 at 6:02 PM
#ABC481
5完でした

A: A+Bを文字列に変換して長さを取得
B: 端点を重複して数えないように半開区間でKを含むか調べ、A_Nを個別に判定
C: HashMapのentry()とor_insert()を使用
D: 消費量0の移動に対応するため01-BFSを使用
E: 角度についてソートして尺取り法を使用
October 24, 2026 at 2:09 PM
(programmer voice) i think we can solve this with a hashmap
October 22, 2026 at 5:00 AM
A list where you needed a map turns a millisecond lookup into a full scan. Which Java data structure to use and why, with a Big-O cheat sheet.

#Java #DataStructures
Java Data Structures: Which One to Use and Why (with a Big-O Cheat Sheet)
Arrays, ArrayList, LinkedList, HashMap, TreeMap, stacks and queues in Java: what each one is good at, a Big-O cheat sheet, and the mistakes that cost performance.
codersite.dev
October 24, 2026 at 2:32 PM
Sigh. `Vec` has `retain` and `retain_mut`. `HashMap` only has `retain`, but it is equivalent to `Vec::retain_mut`, not `Vec::retain`.
October 20, 2026 at 11:51 PM
The security issue was written roughly at the same time as when they ditched strlen() as the hash function for the internal functions hashmap
October 22, 2026 at 4:53 PM
i mean in fairness he probably would have had to implement a hashmap by hand in 1994, but it's very funny
October 20, 2026 at 11:52 PM
ok but like... did he not build a hashmap? it reads like he did but instead of a three-line hash function he used strlen?
October 21, 2026 at 5:11 AM
just saw `HashMap<Integer, Long>`

lol
October 19, 2026 at 2:31 AM