๐ŸŒ
LeetCode
leetcode.com โ€บ problems โ€บ valid-palindrome
Valid Palindrome - LeetCode
Valid Palindrome - A phrase is a palindrome if, after converting all uppercase letters into lowercase letters and removing all non-alphanumeric characters, it reads the same forward and backward.
๐ŸŒ
Medium
lydiaplu.medium.com โ€บ leetcode-541-reverse-string-ii-24a879b40fdd
LeetCode โ€” 541. Reverse String II | by Pan Lu | Medium
January 31, 2024 - Reversing Characters: The characters between left and right are then reversed using a while loop and a temporary variable for swapping. Returning the Result: After all segments are processed, the character array is returned to a string.
Discussions

java - 344. Reverse String LeetCode - Stack Overflow
I've got this code that runs in my IDE, Intellij but it will not run in LeetCode. Am I misunderstanding the question? Write a function that reverses a string. The input string is given as an array... More on stackoverflow.com
๐ŸŒ stackoverflow.com
Reverse words in a string using multithreading?
UPDATE: Since the question was clarified. I'll have to change my answer slightly. Input: "The cat is a dog" Output: "dog a is cat The" One trick to solve this problem is to reverse the entire string once and then reverse the words. So something like this: "The cat is a dog" => "god a si tac ehT" => "dog a is cat The" So you could parallelize the first step. That would require you to choose smaller chunks of ranges within the larger range of 0 to n/2 And then you could parallelize the second step, but only after the first step is completely done. And the second step would look like what I was describing earlier: A helper function called reverseWords(str, start int, end int) This would allow you to process the str chunk by chunk independently on different threads. You would just need to ensure that the cut off points only land on spaces (so as not to cut a word in half). Then, it just becomes a two pointer problem, or you could use a stack if you prefer. More on reddit.com
๐ŸŒ r/leetcode
12
4
April 23, 2024
Today's daily challenge "Reverse words in a string" - Python Solution
return " ".join(filter(lambda x:len(x)!=0,s.split(" ")[::-1])) More on reddit.com
๐ŸŒ r/leetcode
29
6
May 24, 2022
issue in mu code in --> 151. Reverse Words in a String
For the last word 'blue' it adds all letters by using 'if' condition but when 'i' becomes 'n-1' it still executes 'if' condition and 'else' is not executed,hence the last word doesn't get pushed into the stack . You will have to add another check at last that if word.length!=0 then push word. More on reddit.com
๐ŸŒ r/leetcode
2
0
March 1, 2022
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ dsa โ€บ reverse-a-string
Reverse a String โ€“ Complete Tutorial - GeeksforGeeks
After each swap, increment the left pointer and decrement the right pointer to move towards the center of the string. This will swap all the characters in the first half with their corresponding character in the second half.
Published ย  October 3, 2025
๐ŸŒ
Stack Overflow
stackoverflow.com โ€บ questions โ€บ 66214162 โ€บ 344-reverse-string-leetcode
java - 344. Reverse String LeetCode - Stack Overflow
The input string is given as an array of characters char[]. Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory. You may assume all the characters consist of printable ascii characters. class Solution { public void reverseString(char[] s) { int arrayLength = s.length - 1; System.out.print("["); for (int i = 0; i < s.length; i++) { int temp = s.length - i - 1; if (i != arrayLength) { System.out.printf("\"%s\",", s[temp]); } else { System.out.printf("\"%s\"", s[temp]); } } System.out.print("]"); }
๐ŸŒ
LeetCode
leetcode.com โ€บ problem-list โ€บ stack
Stack - LeetCode
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
๐ŸŒ
Medium
valentinplacido25.medium.com โ€บ leetcode-344-reverse-string-javascript-basics-b390f64d05b8
LeetCode 344. Reverse String โ€” JavaScript Basics - Valentin Placido - Medium
October 18, 2020 - You may assume all the characters consist of printable ascii characters. ... var reverseString = function(s) { for (let i = 0; i < s.length/2; i++) { let n = s[i] s[i] = s[s.length-i-1] s[s.length-i-1] = n } };
๐ŸŒ
Pcoroneos
pcoroneos.com โ€บ blog โ€บ leetcode โ€บ 344-reverse-string
Leetcode 344 - Reverse String - Paul Coroneos
May 3, 2025 - Write a function that reverses a string. The input string is given as an array of characters s.
Find elsewhere
๐ŸŒ
LeetCode
leetcode.com โ€บ problems โ€บ rotate-array
Rotate Array - LeetCode
Can you solve this real interview question? Rotate Array - Given an integer array nums, rotate the array to the right by k steps, where k is non-negative. Example 1: Input: nums = [1,2,3,4,5,6,7], k = 3 Output: [5,6,7,1,2,3,4] Explanation: rotate ...
๐ŸŒ
LeetCode
leetcode.com โ€บ problems โ€บ rotate-string
Rotate String - LeetCode
Rotate String - Given two strings s and goal, return true if and only if s can become goal after some number of shifts on s. A shift on s consists of moving the leftmost character of s to the rightmost position.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ dsa โ€บ top-50-string-coding-problems-for-interviews
String Coding Interview Questions - GeeksforGeeks
September 18, 2025 - Reverse Words ยท Check for Rotation ยท First Non Repeating ยท Roman to Integer ยท Implement Atoi ยท Encrypt the String โ€“ II ยท Equal Point in Brackets ยท Anagram Checking ยท Panagram Checking ยท Validate IP Address ยท Add Binary Strings ยท Integer to Words ยท
๐ŸŒ
AlgoExpert
algoexpert.io โ€บ questions
AlgoExpert | Ace the Coding Interviews
The leading platform to prepare for coding interviews. Master essential algorithms and data structures, and land your dream job with AlgoExpert.
๐ŸŒ
Sean Prashad
seanprashad.com โ€บ leetcode-patterns
Leetcode Patterns
A curated list of leetcode questions grouped by their common patterns
๐ŸŒ
LeetCode
leetcode.com โ€บ problems โ€บ valid-anagram
Valid Anagram - LeetCode
Valid Anagram - Given two strings s and t, return true if t is an anagram of s, and false otherwise. Example 1: Input: s = "anagram", t = "nagaram" Output: true Example 2: Input: s = "rat", t = "car" Output: false Constraints: * 1
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ dsa โ€บ dsa-sheet-by-love-babbar
DSA Sheet by Love Babbar - GeeksforGeeks
August 25, 2025 - Your All-in-One Learning Portal. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
๐ŸŒ
LeetCode
leetcode.com โ€บ problems โ€บ validate-binary-search-tree
Validate Binary Search Tree - LeetCode
Can you solve this real interview question? Validate Binary Search Tree - Given the root of a binary tree, determine if it is a valid binary search tree (BST). A valid BST is defined as follows: * The left subtree of a node contains only nodes with keys strictly less than the node's key.
๐ŸŒ
GitHub
github.com โ€บ doocs โ€บ leetcode โ€บ blob โ€บ main โ€บ solution โ€บ 0300-0399 โ€บ 0344.Reverse String โ€บ README_EN.md
leetcode/solution/0300-0399/0344.Reverse String/README_EN.md at main ยท doocs/leetcode
/** Do not return anything, modify s in-place instead. */ function reverseString(s: string[]): void { for (let i = 0, j = s.length - 1; i < j; ++i, --j) { [s[i], s[j]] = [s[j], s[i]]; } }
Author ย  doocs
๐ŸŒ
LeetCode
leetcode.com โ€บ problems โ€บ binary-search
Binary Search - LeetCode
Can you solve this real interview question? Binary Search - Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in nums. If target exists, then return its index. Otherwise, return -1. You must write an algorithm with O(log ...