We’re preparing your current view and syncing the latest data.
Given an integer n, find the number of binary arrays of length n such that no two adjacent elements are equal. Such arrays are called stable binary arrays. Return the total number of possible stable binary arrays of length n.
An integer n representing the length of the binary array.
An integer representing the total number of stable binary arrays of length n.
1 <= n <= 10^5