ServiceNow Interview Question

Problem 1: sort a string in O(n) time Eg: dbcabb -> output: abbbcd Problem 2: Develop a search functionality to show list of all the data on left and filtered data on right. Search bar should be at top with button search, on click of button it should filter the data