LeetCode 344: Reverse String [C++, Python, C, C#]

preview_player
Показать описание
Explained solution of LeetCode 344: Reverse String.
"Write a function that reverses a string. The input string is given as an array of characters s. You must do this by modifying the input array in-place with O(1) extra memory.".
I present solution in pseudo-code, and also in C, C++, C# and Python.

Code from today's lesson:

LeetCode 344: Reverse String:

Lesson content:
0:00 Task Description
0:45 Solution Idea
2:01 Solution #1 Pseudocode
3:55 Solution #2 Pseudocode
5:48 C Code
8:23 C# Code
10:22 C++ Code
15:19 Python Code
Рекомендации по теме