LongestOrderedSequence
✖
LongestOrderedSequence
finds the longest ordered sequence of contiguous or disjoint elements in list.
Details and Options
- LongestOrderedSequence returns the longest common sequence, formed by contiguous or disjoint elements, with disjoint pieces concatenated.
- LongestOrderedSequence works on strings as well as lists.
- If there are several ordered sequences of the same length, LongestOrderedSequence returns the one that begins earliest in list.
- For strings, setting the option IgnoreCase->True makes LongestOrderedSequence treat lowercase and uppercase letters as equivalent, and return the form of sequence that occurs in s.
Examples
open allclose allBasic Examples (4)Summary of the most common use cases
Find the longest ordered substring, in this case formed by contiguous characters:
https://wolfram.com/xid/0tqjl8uwewp88y-ddmsfs
Find the longest ordered sequence of elements in a list:
https://wolfram.com/xid/0tqjl8uwewp88y-j7yk3t
Find the longest strictly ordered sequence of elements in a list:
https://wolfram.com/xid/0tqjl8uwewp88y-vrgyu2
Find the longest decreasing sequence of elements in a list:
https://wolfram.com/xid/0tqjl8uwewp88y-d3x6vl
Scope (2)Survey of the scope of standard use cases
Options (1)Common values & functionality for each option
IgnoreCase (1)
By default, LongestOrderedSequence distinguishes lower case and upper case:
https://wolfram.com/xid/0tqjl8uwewp88y-rem4mi
https://wolfram.com/xid/0tqjl8uwewp88y-7izxd7
https://wolfram.com/xid/0tqjl8uwewp88y-mnprk8
Applications (1)Sample problems that can be solved with this function
Wolfram Research (2015), LongestOrderedSequence, Wolfram Language function, https://reference.wolfram.com/language/ref/LongestOrderedSequence.html.
Text
Wolfram Research (2015), LongestOrderedSequence, Wolfram Language function, https://reference.wolfram.com/language/ref/LongestOrderedSequence.html.
Wolfram Research (2015), LongestOrderedSequence, Wolfram Language function, https://reference.wolfram.com/language/ref/LongestOrderedSequence.html.
CMS
Wolfram Language. 2015. "LongestOrderedSequence." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/LongestOrderedSequence.html.
Wolfram Language. 2015. "LongestOrderedSequence." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/LongestOrderedSequence.html.
APA
Wolfram Language. (2015). LongestOrderedSequence. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LongestOrderedSequence.html
Wolfram Language. (2015). LongestOrderedSequence. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LongestOrderedSequence.html
BibTeX
@misc{reference.wolfram_2024_longestorderedsequence, author="Wolfram Research", title="{LongestOrderedSequence}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/LongestOrderedSequence.html}", note=[Accessed: 10-January-2025
]}
BibLaTeX
@online{reference.wolfram_2024_longestorderedsequence, organization={Wolfram Research}, title={LongestOrderedSequence}, year={2015}, url={https://reference.wolfram.com/language/ref/LongestOrderedSequence.html}, note=[Accessed: 10-January-2025
]}