LinkedIn Interview Question

One basic and one advanced coding problems.