Is this a correct code?
leetcode submission code : https://ide.codingblocks.com/s/248223 cb complete code : https://ide.codingblocks.com/s/248195
why giving TLE in leetcode??
Line 28: Char 26: runtime error: shift exponent 32 is too large for 32-bit type ‘int’ (solution.cpp) SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior prog_joined.cpp:37:26
hello @codingblockscpp
getting tle may because of too many conversion from number of string and from string to number.
u can store two pointers in each nodes of trie ,one to indicate 0 and one to indicate 1.
in this way u can avoid this unnecessary conversion
I had solved sir TQ . I have solved it another way
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.