In this ,if first convert the string to int using the stoi or atoi then sort the array of vectors and then simply subtract the the sorted one and unsorted one ,take the abs value of the diffence,Now the no o digits in the result got after subtracting is ans.
Is this approach good??or theres a better one and will it satisfy all test cases