Let me talk about something obvious but with a bit of quantification...
Theoretically, both arrays and linked lists take O(n) time to traverse, but here's what actually happens when you benchmark by summing 100k integers
- Array: 68,312 ns
- Linked List: 181,567 ns
Summing an array is ~3x faster than LinkedList. Same algorithm, same complexity, but wildly different performance.
The reason is cache behavior. When you access array[0], the CPU fetches an entire cache line (64 bytes), which includes array[0] through array[15]. The next 15 accesses are essentially free. Arrays hit the cache about 94% of the time.
Linked lists suffer from pointer chasing. Each node is allocated separately by malloc(), scattered randomly in memory. Each access likely requires a new cache line fetch, resulting in a 70% cache miss rate.
This is a good example of why Big O notation tells only part of the story. Spatial locality and cache-friendliness can make a 2-3x difference even when the theoretical complexity is identical.
I am sure you would have known this, but this crude benchmark quantifies just how fast cache-friendly algorithms can be.
Hope this helps.
@IndiGo6E I am a participant selected for #SIH2025 and I'm currently facing an issue with my travel from Chennai to Jaipur.
Could you please help verify the flight/ticket status at the earliest? It's important for my participation in the event.
Tagging @AICTE_INDIA, @dpradhanbjp
Noticed a glitch on the #SIH Batch 1 results site Some teams, including mine - Team OpenAl (Problem Statement 25201) - have gone missing! Earlier more teams were
listed, now only 3 show up.
Hope this gets fixed soon
@SIH2024_MIC @EduMinOfIndia@dpradhanbjp#SmartIndiaHackathon
Without Node's practical experience how students learn tech that industry needs routing api integration. This needs to be changed. We always give exams so professors should also have exams.
So that evaluation on the proper bases the authorities will also know what is missing.
We can't even install NODE.JS without ADMIN access, most of the time they don't even remember the admin password also. We were taught web development with a marker and white board.
@Airtel_Presence — Why advertise “Unlimited 5G” and not deliver?
.@DoT_India@TRAI@AshwiniVaishnaw — Please look into these misleading telecom practices. We need transparent communication, not mixed signals from support and stores.
#Airtel5G#TRAI