Hi there!

I am Abhinav Sarkar. I'm a software engineer currently living in Bangalore, India. When not making software, I read books, play drums, take photos and ride my bike.

While you're here, you can read my blog posts, learn about me and this website, or look at the books I've read, the photos I've taken, and the recent activities I've done.


Recent Posts

Fast Sudoku Solver in Haskell #3: Picking the Right Data Structures

  • A thirty-four minute read
  • 4 comments

In the previous part in this series of posts, we optimized the simple Sudoku solver by implementing a new strategy to prune cells, and were able to achieve a speedup of almost 200x. Afterwards, we profiled the solution and found that there were bottlenecks in the program, leading to a slowdown. In this post, we are going to follow the profiler and use the right Data Structures to improve the solution further and make it faster.

Read more


Fast Sudoku Solver in Haskell #1: A Simple Solution

  • A thirty-one minute read
  • 0 comments

Sudoku is a number placement puzzle. It consists of a 9x9 grid which is to be filled with digits from 1 to 9. Some of the cells of the grid come pre-filled and the player has to fill the rest.

Haskell is a purely functional programming language. It is a good choice to solve Sudoku given the problem’s combinatorial nature. The aim of this series of posts is to write a fast Sudoku solver in Haskell. We’ll focus on both implementing the solution and making it efficient, step-by-step, starting with a slow but simple solution in this post1.

Read more

Visit the archive for two more posts.