Created
October 16, 2025 15:12
-
-
Save FlorianWendelborn/62f7f9fe0ff1d5de33be0a44220f4cc6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const isSameOrder = (largerArray: string[], smallerArray: string[]) => { | |
| let largeArrayIndex = -1; | |
| for (const entry of smallerArray) { | |
| const index = largerArray.indexOf(entry); | |
| if (index <= largeArrayIndex) return false; | |
| largeArrayIndex = index; | |
| } | |
| return true; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment