Post, Code and Quiet Time.
  • Home
Sign in Subscribe

Sort,

A collection of 1 post
Buckets Sort,

Maximum Gap

Question: http://www.lintcode.com/en/problem/maximum-gap/ Given an unsorted array, find the maximum difference between the successive elements in its sorted form. Return 0 if the array contains less than 2 elements. Sort is easy but will cost O(nlogn) time. Try to solve it in linear time
Nov 20, 2017 1 min read
Page 1 of 1
Post, Code and Quiet Time. © 2023
Powered by Ghost