#interview
Read more stories on Hashnode
Articles with this tag
Given two strings s and t, return true if they are equal when both are typed into empty text editors. '#' means a backspace character. Note that after...
Given an array of integers nums, return the number of good pairs. A pair (i, j) is called good if nums[i] == nums[j] and i < j. Example 1: Input: nums...
There are n pieces arranged in a line, and each piece is colored either by 'A' or by 'B'. You are given a string colors of length n where colors[i] is...
Given a string s, reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order. Example...
Given an array of n integers nums, a 132 pattern is a subsequence of three integers nums[i], nums[j] and nums[k] such that i < j < k and nums[i] <...
The appeal of a string is the number of distinct characters found in the string. For example, the appeal of "abbca" is 3 because it has 3 distinct...