Pick From Both Sides Interviewbit Solution