Note: Each Program's complete program statement with sample test cases, explanation and outputs are uploaded in their respective folders.