-
PermCheckStudy/알고리즘 2018. 1. 11. 16:59
점수 : 100 / 33 = 63%
알고리즘적 사고 어렵네............
풀다 보면 낳아 지것지
public static int solution(int[] A){ int index =1; while(index <= A.length){ boolean hasNum = false; for(int i = 0; i < A.length ; i++){ if(index == A[i]){ hasNum = true; } } if(!hasNum){ return 0; } index++; } return 1; }
'Study > 알고리즘' 카테고리의 다른 글
PassingCars (0) 2018.01.12 CountDiv (0) 2018.01.12 MaxCounters (0) 2018.01.12 MissingInteger (0) 2018.01.12 FrogRiverOne (0) 2018.01.12 PermMissingElem (0) 2018.01.11 FrogJmp (0) 2018.01.11 CyclicRotation (0) 2018.01.11 OddOccurrencesInArray (0) 2018.01.11 BinaryGap (0) 2018.01.11