Week 9: Friday -------------- Q1. (35 for not using sorting, 25 for using sorting) Input a 4x4 matrix of integers from the user. Write a function that takes the 2-D matrix and populates an array that contains the 2nd smallest element of each row. Print this array. For example, if the matrix is 3 5 8 2 4 9 2 4 5 6 3 6 5 3 3 8 then the array is 3 4 5 3 Try finding the 2nd smallest element in each row without sorting the row. Q2. (65) A string s is called a grouped word if, for each letter in s, all occurrences of that letter are consecutive. As an example, ccaazzzzghb is a grouped word while aabbbcccb is not since all the b's do not occur consecutively. Declare an array of 4 pointers to char representing 4 strings. Input 4 strings from the user after properly allocating space for them (ask for the maximum size of each string). Now, for each string, print whether it is a grouped word. Get rid of the strings that are not grouped words. For the remaning ones, output a permutation of concatenation that produce a grouped word. Note that, the permutation of concatenation here should involve all the remaining strings and not a subset. If there is no such permutation of concatenation, output "No". For example, if the inputs are aabbb cccdd eecc abcb first get rid of abcb as it is not a grouped word. This leaves aabbb cccdd eecc Now, the permutation aabbb eecc cccdd produces a concatenation aabbbeecccccdd which is a grouped word. So, output this permutation. Note that one other permutation eecc cccdd aabbb also produces a valid concatenated grouped word. You can output either of them.