Relative Ranks Leetcode Solution

The problem Relative Ranks Leetcode Solution asks us to return a vector or an array of strings representing the relative ranks. We are provided with an array that represents the score obtained by athletes. Then we use the given score array to assign the ranks. There is a small change …

Read more

Union and Intersection of two Linked Lists

Given two linked lists, create another two linked lists to get union and intersection of the elements of existing lists. Example Input: List1: 5 → 9 → 10 → 12 → 14 List2: 3 → 5 → 9 → 14 → 21 Output: Intersection_list: 14 → 9 → 5 Union_list:   …

Read more