Ayush7614 / Daily-Coding-DS-ALGO-Practice

A open source project🚀 for bringing all interview💥💥 and competative📘 programming💥💥 question under one repo📐📐
https://daily-ds-algo.github.io/DS-Algo-Website/
MIT License
321 stars 474 forks source link

Leetcode Hard Maximum Gap #975

Open sardonicankita opened 3 years ago

sardonicankita commented 3 years ago

Aim

To solve the Leetcode Hard problem "Maximum Gap" in C++. Admins please assign this to me under LGM SOC'21.

Details

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.

Example Input: nums = [3,6,9,1] Output: 3 Explanation: The sorted form of the array is [1,3,6,9], either (3,6) or (6,9) has the maximum difference 3.

Programming language

Saurabh4626 commented 3 years ago

try using Bucket Sort

Adarsh357 commented 3 years ago

I want to try this

kamleshjoshi8102 commented 3 years ago

hi @Saurabh4626 @Amit366 I Want to provide my code under LGMSOC'21 in python

kumarshobhit commented 3 years ago

I would like to contribute in java

Pratik57 commented 3 years ago

I Would like to do it in c under LGMSOC21