How to solve the question

how to code isValidConfig() function in my code please check ide is = https://ide.codingblocks.com/s/139408

I have written sample function for you with algorithm. Have a look