leetCode 932 Beautiful Array(分治)

題目連接 LeetCode 932java 分析 分治,將偶數和奇數分開就行了web code class Solution { public int[] beautifulArray(int N) { if(N==1)return new int[]{1}; else if(N ==2)return new int[]{2,1}; int
相關文章
相關標籤/搜索