A Diary of Solutions to Common Coding Interview Questions and Programming Puzzles

Over the past few months, I have tried to form a long-term habit of reading about and writing solutions to programming puzzles and common coding interview questions. In the process, I have implemented quite a number of solutions to many programming puzzles and compiled them into some sort of constantly updated “diary”. This “diary” is maintained and updated as a git repository on Github.

As at the time of this blog post, the repository contains 60 Python solutions to about 55 programming puzzles and common coding interview questions. Find the repository here:https://github.com/davidadamojr/diary_of_programming_puzzles.

Python Implementation of TextRank (Github Repo)

Find it on Github: https://github.com/davidadamojr/TextRank

A few months ago, I wrote an implementation of “TextRank” in Python. TextRank is an algorithm for automatic keyword and sentence extraction (summarization) proposed by Rada Mihalcea and Paul Tarau in this paper. However, unlike the approach taken in the paper, this implementation uses Levenshtein Distance as the relation between text units.

This implementation carries out automatic keyword and sentence extraction on 10 articles gotten from http://theonion.com.

It achieves the following:

  • Generates a 100 word summary for each article
  • Number of keywords extracted is relative to the size of the text (a third of the number of nodes in the graph)
  • Adjacent keywords in the text are concatenated into keyphrases

Obviously, this algorithm is useful for automatically extracting relevant keywords and automatic summarization of a given body of text.

The implementation has the following dependencies:

Find it on Github: https://github.com/davidadamojr/TextRank