How to different subsequence and substring | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to different subsequence and substring

subsequence and substring both of them similar or not (these operator about java code string )

22nd Nov 2018, 8:30 AM
Jafar Temirov
Jafar Temirov - avatar
1 Answer
+ 5
A subsequence is part of the string that does not appear in chronological order. Example: ↓↓↓ ↓ string = "Sweet potato" subseq = "weep" A substring is a part of the string that appears in chronological order. Example: ↓↓↓ string = "Sweet potato" subseq = "pot" Hth, cmiiw
22nd Nov 2018, 10:32 AM
Ipang