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

Question:

Write an O(n) 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:image

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

Step by Step Answer:

Question Posted: