Problem 61168. Find record values in a sequence

Write a function to find the record values in a sequence—that is, the largest values seen since the start. For example, if the sequence is
1, 2, 0, 4, 5, 3, 7, 8, 6, 10, 11, 9, 13, 14, 12, 16
then the function should return
1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16

Solution Stats

100.0% Correct | 0.0% Incorrect
Last Solution submitted on Jan 20, 2026

Solution Comments

Show comments

Problem Recent Solvers2

Suggested Problems

More from this Author321

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!