greedy1 Codility : Greedy MaxNonoverlappingSegments 풀이 Java, Greedy 알고리즘 문제 MaxNonoverlappingSegments coding task - Learn to Code - Codility Find a maximal set of non-overlapping segments. app.codility.com Located on a line are N segments, numbered from 0 to N − 1, whose positions are given in arrays A and B. For each I (0 ≤ I < N) the position of segment I is from A[I] to B[I] (inclusive). The segments are sorted by their ends, which means that B[K] ≤ B[K + 1] for K.. 2022. 3. 4. 이전 1 다음 반응형