how to sort python linked list without using built in commands to print display descending order on age? class LinkedLis

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
correctanswer
Posts: 43759
Joined: Sat Aug 07, 2021 7:38 am

how to sort python linked list without using built in commands to print display descending order on age? class LinkedLis

Post by correctanswer »

how to sort python linked list without using built in
commands to print display descending order on age?
class LinkedList:
def __init__(self, data):
self.label = data[0][0]
self.age = data[0][1]
self.tail = None if (len(data) ==1) else
LinkedList(data[1:])
people = LinkedList (["bob", 49),("tom", 36), ("mary", 21)]
Register for solutions, replies, and use board search function. Answer Happy Forum is an archive of questions covering all technical subjects across the Internet.
Post Reply