#java
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] <...
You are given two strings s and t. String t is generated by random shuffling string s and then add one more letter at a random position. Return the...