Skip to content

ROHITHAKULA-06/relative-sort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

The Relative Sort Algorithm is a specialized sorting technique designed to sort an array based on the order defined by a given reference array. This method is useful when you need to sort elements according to a custom order rather than the natural numerical or alphabetical order.

Example Input: list1 = ["a", "b", "c", "d", "e", "f", "g", "h", "i","j"] list2 = [0, 1, 1, 0, 1, 2, 2, 0, 1, 0]

Output: ['a', 'd', 'h', 'j', 'b', 'c', 'e', 'i', 'f', 'g']

About

python code for relative sort

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages