wrong ans when making array global

in one question of the live contest i have created a recursive function where i allocated around 200 size integer array. my solution passes 6 test cases while other give sigsegv. i think its because of memory allocation in each recursive call. but when i make that array global by making it into a 2d array where each row corresponds to a rucursive call and then i submit my ans all the test cases show WA. why is this so?