Leetcode solution: 1331 Rank Transform of an Array

2 years ago
2

Leetcode solution: 1331 Rank Transform of an Array

Given an array of integers arr, replace each element with its rank.

The rank represents how large the element is. The rank has the following rules:

Rank is an integer starting from 1.
The larger the element, the larger the rank. If two elements are equal, their rank must be the same.
Rank should be as small as possible.

##############

My other Leetcode solving videos (easy)

https://www.youtube.com/playlist?list=PLg9w7tItBlZt4oUpNyWU_0rOItlScu1_d

Leetcode solving videos (Medium):

https://www.youtube.com/playlist?list=PLg9w7tItBlZvMGxy-y1eXURPD6Ao6kkzA

Leetcode solving videos (Hard):

https://www.youtube.com/playlist?list=PLg9w7tItBlZt4JQmlkGD3M5idZn14NyL6

############

Loading comments...