solutions to common coding problems