Https://hack.codingblocks.com/contests/c/452/1121

https://hack.codingblocks.com/contests/c/452/1121
can you please give me hint of this question i am not able to approach this question.i am not able to figure out
how to apply sort function on one column.

Heyy Nitesh !!! First you take an array of strings and take inputs in it. Make a compare function with which you are gonna sort the array . In this function you will have two strings to compare , take ith strings of both strings ( as it contains strings having spaces , so just extract ith strings i.e. string after i-1 spaces , take care of boundary cases) . After you have sorted the array , print the output according to boolean input i.e. wheather the input is true or false .
Here i have written its code , you can take help of this .
https://ide.codingblocks.com/#/s/17848
:wink: