Feb 13 · 2 min read · Question Given an array of integers numbers that is sorted in non-decreasing order. Return the indices (1-indexed) of two numbers, [index1, index2], such that they add up to a given target number target and index1 < index2. Note that index1 and index...
Join discussionFeb 12 · 2 min read · Question Given a string s, return true if it is a palindrome, otherwise return false. A palindrome is a string that reads the same forward and backward. It is also case-insensitive and ignores all non-alphanumeric characters. Note: Alphanumeric chara...
Join discussionFeb 11 · 3 min read · Question Given an array of integers nums, return the length of the longest consecutive sequence of elements that can be formed. A consecutive sequence is a sequence of elements in which each element is exactly 1 greater than the previous element. The...
Join discussionFeb 5 · 5 min read · Question Given an array of strings strs, group all anagrams together into sublists. You may return the output in any order. An anagram is a string that contains the exact same characters as another string, but the order of the characters can be diffe...
Join discussionFeb 4 · 2 min read · QUESTION: Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-2<sup>31</sup>, 2<sup>31</sup> - 1], then return 0. Assume the environment does not allow yo...
Join discussion
Jan 30 · 5 min read · . (Everything you need. Nothing you don’t.) Hello everyone 👋Welcome back to our DSA journey. Today’s problem is not hard.But it is deep. It looks like a simple string question, yet it quietly teaches you: How to read loops How to track state How...
Join discussion
Jan 27 · 6 min read · (The problem that confused me… until it didn’t) I’ll be very honest today. When I first saw “Leaders in an Array”, my brain went completely blank.I didn’t even understand what the problem was asking, forget about solving it. I googled.I watched video...
Join discussion
Jan 23 · 4 min read · Alright. Be honest. At some point in your coding life, you definitely wrote a nested loop, leaned back in your chair, and thought: “Yeah… this should work.” And technically?It did. But interviews don’t care about technically.They care about efficie...
Join discussion