Print 2-D co-ordinate points in ascending order followed by their frequencies
Given two arrays x[] and y[] where x[i] represents the x coordinate and y[i] represent the corresponding y coordinate of a 2-D point, the task is to print the coordinate points in ascending order followed by their frequencies.Examples: Input: x[] = {1, 2, 1, 1, 1}, y[] = {1, 1, 3, 1, 3} Output: 1 1 2 1 3 2 2 1 1Input: x[] = {-1, 2, 1, -1, 2}, y[] =