Back to Browse

How I solved LeetCode 125. Valid Palindrome in JavaScript

97 views
Sep 20, 2023
8:46

Hey! My name is Tomas. Thanks for checking out my channel. LeetCode 125. Valid Palindrome: https://leetcode.com/problems/valid-palindrome/ Solution: https://github.com/R-Tomas-Gonzalez/github/tree/main/0242-valid-anagram .toLowerCase: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase .match: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match Notes: • consider numbers, spaces, different cased letters, weird characters • we know it's a palindrome if a string has the same letters all the way down to the middle • consider a pointer system • create a pointer that keeps track of the start of the string • create a pointer that keeps track with the end of the string • consider a while loop to go through the entire string/array • Connect with me on LinkedIn: https://www.linkedin.com/in/rtomasgonzalez/ Happy Coding!

Download

0 formats

No download links available.

How I solved LeetCode 125. Valid Palindrome in JavaScript | NatokHD