Skip to main content

Algorithms

Implementing Linked List in Java: Part 1

·8 mins
Introduction # In the last post, we have already seen that we can classify entire data structure into linear and non-linear data structure. Today we will see how we can implement one of the linear data structures in Java. Initial plan was to implement Linked List in Python. But Python is so higher level that we’d be actually writing higher order data structure on top of high order data structure. What I try to say with that is Python already has those data structure implemented. Java is more close to C/C++, and gives a balance of features and flexibility. I’d have chosen C++ for this post, but I don’t want to deal with memory management and pointers for sake of this post.

Data Structures 101

·8 mins
Introduction # Like most self-taught programmers, I spent a lot of my years dabbling with different technologies. But there comes a time in every programmer’s life when they have to learn data structures and algorithms to proceed in their careers. In this post, I will go through the basics of data structures, what purpose they serve, and what’s common between all of them.

Benchmarking in Go, with Example

Introduction # From The Zen of Go: If you think it’s slow, first prove it with a benchmark Don’t assume if things are slow. Benchmark it and see if they are really slow. One thing to note here is benchmarking a program is different from profiling a program. Benchmarking is the way we check how fast our algorithm is for a given unit of the program. In benchmarking, we typically see how many iterations can a piece of code can run in a given time.