A company wishes to bucketize their item ids for better search operators.the bucket for the item id is chosen on the basis of the maximum value of the digit in the item id write an algorithm to find the bucket to which the item id will be assigned.
1
Expert's answer
2021-10-05T23:13:33-0400
itemID = input(">")
bucket = itemID[0]
for item in itemID:
if item > bucket:
bucket = item
print(bucket)
Comments
Leave a comment