C++ Solution

Longest Palindromic Substring LeetCode Solution

Given a string s, return the longest palindromic substring in s. A palindrome is a string which reads the same in both directions. For example, S = “aba” is a palindrome, S = “abc” is not.

Longest Palindromic Substring LeetCode Solution Read More »

Leetcode Solution

Contains Duplicate III LeetCode Solution

You are given an integer array nums and two integers indexDiff and valueDiff. Find a pair of indices (i, j) such that: i != j, abs(i – j) <= indexDiff. abs(nums[i] - nums[j]) <= valueDiff, and Return true if such pair exists or false otherwise.

Contains Duplicate III LeetCode Solution Read More »

Leetcode Solution
Scroll to Top