Write an O(n) time program that prompts the user to enter a sequence of integers ending with

Question:

Write an O(n) time program that prompts the user to enter a sequence of integers ending with 0 and finds the longest subsequence with the same number. Here is a sample run of the program:

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: