---
title: "Discussion on \"Maximum Gap\" | Hashnode"
description: "Discussion on \"Maximum Gap\". Problem statement\nGiven an integer array nums, return the maximum difference between two successive elements in its sorted form. If the array contains less than two elements, return 0.\nYou must write an algorithm that runs in linear time and uses lin..."
url: "https://hashnode.com/posts/maximum-gap/64985bd45244606d9b5fcb1e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Maximum Gap](https://alkesh26.hashnode.dev/maximum-gap?utm_source=hashnode&utm_medium=feed)

Problem statement Given an integer array nums, return the maximum difference between two successive elements in its sorted form. If the array contains less than two elements, return 0. You must write an algorithm that runs in linear time and uses lin...

Jun 25, 2023 · 9 min read · alkesh26.hashnode.dev  
Read the article

-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#algorithms](https://hashnode.com/tag/algorithms)
-   [#go](https://hashnode.com/tag/go)
-   [#cpp](https://hashnode.com/tag/cpp)
-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Alkesh Ghorpade](https://hashnode.com/@alkesh26)

@alkesh26 · Pune, India

  
[View profile](https://hashnode.com/@alkesh26)

Senior Sofware Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
