#data-structures
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 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] <...
A path in a binary tree is a sequence of nodes where each pair of adjacent nodes in the sequence has an edge connecting them. A node can only appear...
You are given an array of positive integers nums and want to erase a subarray containing unique elements. The score you get by erasing the subarray is...