Back to Browse

917. Reverse Only Letters | LeetCode Solution

27 views
May 7, 2026
6:34

In this video, I solve LeetCode Problem 917 β€” **Reverse Only Letters** using an easy and beginner-friendly approach in C++. πŸ“Œ Problem Statement: Given a string `s`, reverse only the English letters in the string while keeping all non-letter characters in their original positions. πŸ”Ή Example: Input: `"a-bC-dEf-ghIj"` Output: `"j-Ih-gfE-dCba"` πŸ’‘ In this solution, we will: * Understand the problem step by step * Handle special characters correctly * Use an efficient two-pointer approach * Write clean and optimized C++ code * Analyze time and space complexity πŸš€ Perfect for beginners practicing: * Strings * Two Pointer Technique * LeetCode Easy Problems * C++ DSA Preparation If you found this video helpful, make sure to Like πŸ‘, Share πŸ“€, and Subscribe πŸ”” for more coding and DSA content! #leetcode #cpp #dsa #coding #programming #strings #twopointers #leetcodeeasy

Download

0 formats

No download links available.

917. Reverse Only Letters | LeetCode Solution | NatokHD