C3 AI Interview Question

Simple sorting array problem and 1 hard graph problem