Write a function to find the longest common prefix string amongst an array of strings. Return empty string if there is no common prefix.
Input: strs = ['flower','flow','flight'] Output: 'fl' Input: strs = ['dog','racecar','car'] Output: ''
Unlock hints progressively β start gentle, go deeper only if needed.
Level 1: Gentle Nudge
A subtle direction
Level 2: Approach
The algorithm to use
Level 3: Detailed
Step-by-step guidance
to save progress and use AI features