Codility - Distinct Codility - Distinct 중복 처리 문제Codility - Distinct 중복 처리 문제 Write a function function solution(A); that, given an array A consisting of N integers, returns the number of distinct values in array A. For example, given array A consisting of six elements such that: A = 2 A = 1 A = 1 A = 2 A = 3 A = 1 the function should return 3, because there are 3 distinct values appearing in array..
Codility - PermCheck Codility - PermCheck 순열 체크하는 문제 A non-empty array A consisting of N integers is given. A permutation is a sequence containing each element from 1 to N once, and only once. For example, array A such that: A = 4 A = 1 A = 3 A = 2 is a permutation, but array A such that: A = 4 A = 1 A = 3 is not a permutation, because value 2 is missing. The goal is to check whether array A is ..