Related Posts
How to update file timestamps in Python
Sometimes you can be real picky like me about timestamps of files, for example, during my wedding we had a few digital cameras, and one of the cameras had its internal clock 4 hours behind. So what better way for a lazy guy like you to change timestamps than writing a short python script to […]
Pascal Triangle Generator in Python, and then in Haskell – The Gubatron Method
Here’s in python, imperatively, and then in functional style without the need for loops. This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters […]
BFS vs DFS Graph Search Algorithms in Python
Here are implementations of iterative BFS and DFS search algorithms in Python. These are just to illustrate the slight difference in implementation of these algorithms. Basically, if you want to go deep, with DFS, you can use a queue on which you’ll be adding the next elements to explore as you traverse the graph. If […]