전체 글49 Hadoop 개념 - HDFS(Hadoop Distributed File System) 학부생에 있을때 3학년부터 4학년까지 분산처리 관련 프로젝트를 진행하며, Hadoop을 기술적으로 이용만 했을 뿐, 필요한 부분 이외에는 그 속에 남긴 의미를 이해하려하지 않았다. 하지만 2011년 Hadoop을 처음 접했을 때와 지금은 많은 부분이 달라졌다. 클라우데라(Cloudera)와 같이 CDH(Cloudera's Destributed in Apache Hadoop) 배포판으로 쉽게 하둡을 설치하고 사용 할 수 있으며, Hadoop Eco System에 포함된 전반적인 솔루션을 쉽게 설치해 사용 할 수 있다는 점이다. 서론은 여기까지 하고, 하둡에 대해 이야기 해보자. (1) HDFS (Hadoop Distributed File System)① HDFS 설계원칙데이터를 많은 사용자가 네트워크 환경.. 2014. 11. 23. 반복되지 않는 첫 번째 문자 찾기 Q. 문자열에서 처음으로 반복되지 않는ㄴ 문자를 찾아내는 효율적인 함수를 작성하라. 예를 들어 "total"에서 처음으로 등장하는 반복되지 않는 문자는 'o'이며, "teeter"에서 처음으로 등장하는 반복되지 않는 문자는 'r'이다. 자신이 작성한 알고리즘의 효율에 대해 논하라. A.1) 가장 쉬운 방법은 특정 문자를 그 문자열에 있는 다른 모든 문자와 비교하여 그 문자가 반복되는지 아는 방법이다. 하지만 이같은 풀이는 실행시간이 오래걸린다. 문자열 길이가 n이라면 최악의 경우 n개의 문자들을 모두 n번씩 비교해야 한다.(마치 버블 정렬같이) 즉, 시간복잡도 O(n^2)을 가진다. 그렇다면 더 효과적으로 해결할 수 있는 방법은 없을까? 2) 이 문제는 데이터에 대한 효율적인 검색을 할 수 있는지 유도하.. 2014. 11. 18. Codility - ArrayInversionCount https://codility.com/demo/results/demoBD476U-K6K/ Task descriptionA zero-indexed array A consisting of N integers is given. An inversionis a pair of indexes (P, Q) such that P < Q and A[Q] < A[P].Write a function:class Solution { public int solution(int[] A); }that computes the number of inversions in A, or returns −1 if it exceeds 1,000,000,000.Assume that:N is an integer within the range [0..1.. 2014. 10. 26. Codility - Equi Leader https://codility.com/demo/results/demoV3FC6D-GGH/ Task descriptionA non-empty zero-indexed array A consisting of N integers is given.The leader of this array is the value that occurs in more than half of the elements of A.An equi leader is an index S such that 0 ≤ S < N − 1 and two sequences A[0], A[1], ..., A[S] and A[S + 1], A[S + 2], ..., A[N − 1] have leaders of the same value.For example, g.. 2014. 10. 26. Codility - Domains https://codility.com/demo/results/demoHKWW2G-8TM/Task descriptionA zero-indexed array A consisting of N integers is given. Thedominator of array A is the value that occurs in more than half of the elements of A.For example, consider array A such thatA[0] = 3 A[1] = 4 A[2] = 3 A[3] = 2 A[4] = 3 A[5] = -1 A[6] = 3 A[7] = 3The dominator of A is 3 because it occurs in 5 out of 8 elements of A (namel.. 2014. 10. 26. Codility - Fish https://codility.com/demo/results/demoV445T8-FZN/ Task descriptionYou are given two non-empty zero-indexed arrays A and B consisting of N integers. Arrays A and B represent N voracious fish in a river, ordered downstream along the flow of the river.The fish are numbered from 0 to N − 1. If P and Q are two fish and P < Q, then fish P is initially upstream of fish Q. Initially, each fish has a uni.. 2014. 10. 26. 이전 1 2 3 4 5 6 7 8 9 다음