mirror of
https://github.com/Manoj-HV30/dsa-competitive-programming.git
synced 2026-05-16 19:35:22 +00:00
leetcode new problems
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
Time complexity : O(n*m) where is n is the number of strings in the list and m is length of the shortest string
|
||||
|
||||
space complexity : O(1)
|
||||
|
||||
We start from first character of first string and compare it with all other strings, if no mismatch then add it to prefix string else return the prefix string
|
||||
Reference in New Issue
Block a user