Back to Browse

1299. Replace Elements with Greatest Element on Right Side in python | DSA in python | leetcode

244 views
Jun 4, 2023
16:25

Given an array arr, replace every element in that array with the greatest element among the elements to its right, and replace the last element with -1. After doing so, return the array. https://leetcode.com/problems/replace-elements-with-greatest-element-on-right-side/description/ Code4Love Python Solution

Download

1 formats

Video Formats

360pmp421.7 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

1299. Replace Elements with Greatest Element on Right Side in python | DSA in python | leetcode | NatokHD