Zoho interview question

Sort an array of strings

Interview Answers

Anonymous

5 July 2024

array = ["apple", "banana", "cherry", "date"] sorted_array = sorted(array) print(sorted_array)

Anonymous

30 June 2024

Use the dictionary approach

3

Anonymous

5 July 2024

array = ["apple", "banana", "cherry", "date"] sorted_array = sorted(array) print(sorted_array)