Given a string s containing only digits, Your task is to complete the function genIp which returns a vector containing all possible combination of valid IPv4 ip address and takes only a string s as its only argument .
Note : Order doesn't matter
For string 11211 the ip address possible are
The first line of input will contain no of test cases T. Then T test cases follow . Each test case will contains a string s .
The output in the expected output will be 1 if successfully all the combinations were obtained in the returned vector else it will be 0.
Example(To be used only for expected output):
Note:The Input/Ouput format and Example given are used for system's internal purpose, and should be used by a user for Expected Output only. As it is a function problem, hence a user should not read any input from stdin/console. The task is to complete the function specified, and not to write the full code.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.