Provide two programming examples in which multithreading provides better performance than a single-threaded solution. Provide one example where singlethreaded solution performs better than multi-threaded solution