Day 4: Coding Challenge
Shraddha M Thakur
Software Developer | Actively Seeking Opportunities | Computer Applications Graduate | Passionate about Product Innovation
Problem - To find the longest common prefix from the given list of strings.
Solution - 1st case: To iterate through all strings in the array
2nd Case: Divide and Conquer technique, divide the string into substrings, same process repeat until there is no character mismatch. This is the optimal approach for this problem.
Time Complexity : O(n)
Space Complexity: O(1)
#problemsolvingskills #30daysofcodechallenge #30daysofcode #problemsolving #datastructures #algorithm