Company: Intuit_21_jan
Difficulty: medium
Student Arrangement body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; line-height: 1.6; } h1, h2, h3 { border-bottom: 1px solid #ccc; padding-bottom: 5px; } code { background-color: #f0f0f0; padding: 2px 4px; border-radius: 3px; } pre { background-color: #f0f0f0; padding: 10px; border-radius: 5px; } Student Arrangement Problem Description Numbers must be assigned to classmates represented in an array. An arrangement is considered good if the absolute difference between any two adjacent students is at most 1. The input array contains some missing elements marked as 0 . Your task is to find the total number of ways to replace these missing elements with arbitrary integers to form a good array. Since the answer can be large, return it modulo (10 9 + 7). Function Description Complete the function countGoodArrays in the editor. It has the following parameter: int arr[n] : an array of integers.