Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
Arrays and Dynamic Arrays in C#: Contiguous Memory, Indexing and Writing Your Own List
A dynamic array is an array that moves to a new array twice its size when it fills up; 1,000,000 Adds copy only 1,048,572 elements in total, so the cost per element is constant. We write our own DynamicArray<T> with xUnit tests, explain why a removed slot must be cleared for the GC, and show with BenchmarkDotNet that walking a 4,000×4,000 grid column by column is 3 times slower than row by row.
Why Algorithms and Data Structures Still Matter: A Roadmap for .NET Developers
The right data structure keeps the same code standing as the data grows: 100 ISBN lookups in a 100,000-book catalog take 9.7 ms with a List, 6.5 µs with binary search on a sorted array and 0.93 µs with a Dictionary. The post explains the difference between an abstract data type and its implementation, the series' xUnit and BenchmarkDotNet workflow and the 22-post roadmap.