LeetCode 344: Reverse String - Interview Prep Ep 56

preview_player
Показать описание


⭐ Support my channel and connect with me:

Solutions explained:
Use two pointers: one starts from the left end, the other starts from the right end, we keep swapping the two elements pointed by the two pointers and keep moving the two pointers towards the middle until they meet.
Time: O(n)
Space: O(1)

// TOOLS THAT I USE:

// MY FAVORITE BOOKS:

My ENTIRE Programming Equipment and Computer Science Bookshelf:

And make sure you subscribe to my channel!

Your comments/thoughts/questions/advice will be greatly appreciated!

#softwareengineering #leetcode #algorithms #coding #interview #SDE #SWE #SiliconValley #programming #datastructures
Рекомендации по теме
Комментарии
Автор

At 4:51 I think u meant Space complexity is O(1). Time complexity is O(n).

csclasses
Автор

Amazing work! Could you do a solution for 399. Evaluate Division?

BayesianBrain