Problem I’m attempting to find companies who mention a particular service in on their homepage. To do this, I am […]
Tag: python-2.x
Optimizing SPOJ edit distance solution
Problem I was doing a standard problem of DP (dynamic programming) on SPOJ Edit Distance using Python. t = raw_input() […]
Ackermann function in Python 2.7
Problem I’m relatively new to Python. I just want some constructive feedback on how to improve my code efficiency, style, […]
Find all needles in the haystack and return their sum
Problem This is based on a programming challenge I recently solved. However, since the writer of the challenge asked me […]
Repeatable HTTP requests in Python
Problem I have a simple python script that’s repeating a HTTP response/request. I would like to know how I could […]
Trie Tree match string containing ? and *
Problem Using Python 2.7 and here is my code which implement trie match for a whole word, and also support […]
Calculating and printing a credit card balance
Problem I am working on a problem that simply calculates and prints the credit card balance. I hope this code […]
Python App that parses file for lines that match a format
Problem I recently wrote some code that was dinged on not having well defined tests and poor modularity. Was hoping […]
Solving a variation of the “Partition Problem”
Problem In my version of the Partition Problem, I have a set of weights that are all powers of three […]
Serialize and deserialize a tree
Problem Suppose each node of a tree has maximum n children. I want to serialize and de-serialize for a tree. […]