Oracle Interview Question

Round 2: Again two coding questions from Graph and DP, and theoretical questions from Java, merely a rapid-fire round.