The code is working great on ide but here its showing error look into this
@luniatarun22 share your code
hello @luniatarun22
check this case. your code is giving wrong output.