Sample code for various problems