the code was working fine with given inputs,but not working with user input,I’ve tried with array also,but nothing works
Logic is not working after taking user input
@uthyasani
hello puspita,
u need to take or ( || ) of both the results ( result if u exclude current element and result if u include ur current element).
if any of the two gives u true then return true (1 ) otherwise return false(0)