Solved both, but took more time on first one, and I improvised answer when he asked me to run few test cases ended up with right answer without many hints but I feel I did not do a good job of explaining it. Did a good job on second one but feel pretty bad after failing the phone screen.