add solution for stock problem