How to take input

How am I supposed to take such input as the size of the array is not defined. I have tried using getline but then it is not able to extract the correct values into the array from the string used

hi @astha119btcse21_7380491a239a3b9b,

I have build the entire algorithm but the input part is not working for all the test cases please help

Hi u can refer the code I gave its for input only @astha119btcse21_7380491a239a3b9b