This is a question on bitmask on DP. Although there an editorial available it is very hard to understand. I have solved some question on basic bitmask with DP, however, I am not able to understand its solution or editorial. It would be very helpful if someone could come up with a simple explanation. problem link and Editorial link