In this video we look at our first string algorithm. We solve this problem in three different ways. The first approach highlights how the time complexity can grow when we perform string manipulation within a loop. The second shows a simple one-liner. The third solution shows the most efficient way to solve the problem.
--------------------------------------------------
Recommended Udemy courses
--------------------------------------------------
Understanding TypeScript: https://tinyurl.com/9wz6fp7k
NodeJS - The Complete Guide: https://tinyurl.com/3z4ehtpm
React - The Complete Guide: https://tinyurl.com/2t6v5yeu
Angular - The Complete Guide: https://tinyurl.com/4h5rmpsj
DSA TS Playlist: • Data Structures and Algorithms (TypeS...
00:00-02:00 - Understanding the problem
02:01-07:05 - Intuitive solution o(n^2)
07:06-10:10 - One line simple solution o(n*lgn)
10:11 - Efficient solution o(n)