Created
July 13, 2024 17:04
-
-
Save DataKinds/c31882faae542ad342d279ac2f17c354 to your computer and use it in GitHub Desktop.
Leetcode 14 (https://leetcode.com/problems/longest-common-prefix/description/) in J
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
NB. https://leetcode.com/problems/longest-common-prefix/description/ | |
lcp=:> @ }: @ (([: ~: (1&= @ $ @ ~.)"1) <;.1 {."1) | |
lcp (|: @: >)'flower';'flof';'flower';'flighr' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment