[Java][Leetcode] Arraay — Replace Elements with Greatest Element on Right Side #1299

Input: arr = [17,18,5,4,6,1]
Output: [18,6,6,6,1,-1]
  • 1 <= arr.length <= 10^4
  • 1 <= arr[i] <= 10^5

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

0xCatz Movement

Cat whiskers were updated, and quality was increased.

Development Update (10–08–2020)

Cloud Native Best Business Practices (Part 1): Containerization Cuts Costs

PHPUnit & Laravel — Unit Testing Basics

Forest Admin vs React Admin: Which is Better for Your Project?

portworx install on-premisses kubernetes

Damage VFX using Animated Sprites in Unity

The Serverless Journey Begins…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
SP Hou

SP Hou

More from Medium

A Look Back at the MTSU Blue Raiders Men’s Basketball 2021–22 Season

Entries into the lighthouse project now live on Moonscape November 20, 2021 by Chris Bassey Over…

Law Experts Say Police Reform Well Over Due in Thailand

How Gm.etro’s randomPicker works