Category: sorting
You have an array of logs. Each log is a space delimited string of words. For each log, the first word in each log is an alphanumeric identifier. Then, …
Nowadays, you don’t have to implement your sorting algorithms e.g. quicksort, selection sort, insertion sort etc by yourself. Most programming languages provide the functions/library to do the sorting efficiently, …
Given an array of distinct integers arr, find all pairs of elements with the minimum absolute difference of any two elements. Return a list of pairs in ascending order(with …
Given two arrays, write a function to compute their intersection. Example 1: Input: nums1 = , nums2 = Output: Example 2: Input: nums1 = , nums2 = Output: Note: …
Given an array of integers A, return the largest integer that only occurs once. If no integer occurs once, return -1. Example 1: Input: Output: 8 Explanation: The maximum …