Sort strings according to numbers of matches required to represent them
Given an array arr[] of N strings, the task is to sort these strings according to the numbers of matches required to represent them. Examples: Input: arr[] = { “123”, “46”, “8”, “88” } Output: 8 46 123 88 8 -> 7 sticks 46 -> 10 sticks 123 -> 12 sticks 88 -> 14 sticks Input: arr[] =… Read More »
