Interview question asked to Software Engineers interviewing at IBM, Brex, Yahoo and other companies. Original question asked: Implement the next permutation algorithm..