#computer-science
Read more stories on Hashnode
Articles with this tag
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...
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...
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...
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...