What is the goal of Longest Common Prefix?
Practice this question from Longest Common Prefix - Single Branch Trie Pattern Practice Quiz, with options and an explanation.
Question
What is the goal of Longest Common Prefix?
Option A — Correct answer
Return the longest prefix shared by all strings.
Option B
Only sort a fixed array once
Option C
Only print all recursion paths
Option D
Only detect whether a number is prime
Explanation
Return the longest prefix shared by all strings.