Can you give me a hint as to how you solved this? I know that you don't need to add all the bits of A and B to get a specific bit in C, but even with that optimization, I still can't solve it in time. 6/11 test cases finish in time, while the other 5 exceed the time limit. Thanks.
the key technique for my solution was performing multiple addition in single operation. (ex. I have two arrays and in single addition operation...I am able to add multiple elements of array)...hope it will help U :)
Can you give me a hint as to how you solved this? I know that you don't need to add all the bits of A and B to get a specific bit in C, but even with that optimization, I still can't solve it in time. 6/11 test cases finish in time, while the other 5 exceed the time limit. Thanks.
ReplyDeletethe key technique for my solution was performing multiple addition in single operation. (ex. I have two arrays and in single addition operation...I am able to add multiple elements of array)...hope it will help U :)
ReplyDelete