How to solve this for the large inputs as I am getting wrong answer for both of my test cases.
Java HotSpot™ 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000435980000, 8000110592, 0) failed; error=‘Cannot allocate memory’ (errno=12)
How to solve this for the large inputs as I am getting wrong answer for both of my test cases.
Java HotSpot™ 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000435980000, 8000110592, 0) failed; error=‘Cannot allocate memory’ (errno=12)