Tag: algorithms
Given a list of integers nums, return whether there’s two numbers such that one is a triple of another. Constraints n ≤ 100,000 where n is the length of …
Given a list of integers nums, return whether the number of occurrences of every value in the array is unique. Note: Numbers can be negative. Constraint n ≤ 100,000 …
Given a two-dimensional integer matrix, sort each of the columns in ascending order. Example 1 Input matrix = , , ] Output , , ] Column Sort In order …
Segment Tree is one of the most important data structure in Computer Science. Similar to Binary Index Tree, a Segment Tree allows us to update and query (range) in …
Given a string s, return the length of the longest substring between two equal characters, excluding the two characters. If there is no such substring return -1. A substring …