Create a component that finds the longest consecutive sequence in a hardcoded array of integers and displays the result.
HardProblem Statement
Create a component that finds the longest consecutive sequence in a hardcoded array of integers and displays the result.
Sample Input
[100, 4, 200, 1, 3, 2]
Sample Output
Longest Sequence: 4
Limits
Time: 2s · Memory: 256 MB
Code Editor
Log in to submit00:00
Try your code in this preview. Submit marks it done.
import React from "react"; const LongestSequence = () => { return ( <div> {/* Display the longest sequence */} </div> ); }; export default LongestSequence;