Reverse String | LeetCode 344 | Coding Interview Tutorial

preview_player
Показать описание
Reverse String solution: LeetCode 344

AFFILIATE LINKS
If you're interested in learning algorithms, these are great resources.

💲 All coupons and discounts 💲

Reverse String | LeetCode 344 | Microsoft Coding Interview
#reversestring #leetcode #algorithms #terriblewhiteboard #codinginterview

Click the time stamp to jump to different parts of the video.
00:00 Title
00:07 Problem readout
00:57 Whiteboard solution
03:32 Coding solution
05:55 Result and outro
Рекомендации по теме
Комментарии
Автор

If there are any videos you'd like me to make or if you have any ideas on how to optimize this solution, let me know!

TerribleWhiteboard
Автор

I paused the video half way to say. I love you, thank you for doing this.

mesh
Автор

Nice and well thought out explanation. It was not obvious on leetcode solution but this video is so good.

Kovai
Автор

Wow, this is amazing. Thank you so much for showing step by step! This kind of tutorial I was looking for for a long time! Love this <3<3

Shisa
Автор

Nice video, one question, what is the Big(o) of this? from my perspective is O(log n) because you only iterate the half of the length, but I found some saying that it is o(n).
Thanks

chargoy
Автор

how would you console.log the output in this case to see what's going on?

hideinbush
Автор

class Solution {
public:
void reverseString(vector<char>& s)
{
int len=s.size();
for(int i=len-1;i>=0;i--)
{

cout<<s[i];
}
}
};
why this approach is not work

anjandey
Автор

Sir, instead of this can we use s.reverse(); or should we not use inbuilt functions?

pragathis
Автор

This is my solution: s.toString().split(", ").reverse(); BUT I cannot submit.

fernandosalas