solutions for some common compsci problems