programming/algorithm 공부 썸네일형 리스트형 [hackerrank] s10-basic-statistics Day 1 - Interquartile Range 1. 문제 정보 1) 링크 : https://www.hackerrank.com/challenges/s10-interquartile-range/problem Day 1: Interquartile Range | HackerRank Calculate the interquartile range. www.hackerrank.com 2) 혹시 링크가 바뀔경우 문제 파일 PDF : 2. 설명 1) 요구사항 - 정의된 Quartiles 값을 출력하되 소수점 한자리수까지만 출력한다. - 입력값은 특정 범위내 자연수이다. 2) 입력값 입력값은 세가지이다. N과 int 배열 2개가 각 배열의 원소의 값이 공백란으로 구분되어 하나씩 입력된다. - 모두 자연수이며 {N | 5 더보기 [hackerrank] s10-basic-statistics Day 1: Quartiles 1. 문제 정보 1) 링크 : https://www.hackerrank.com/challenges/s10-quartiles/problem Day 1: Quartiles | HackerRank Calculate quartiles for an array of integers www.hackerrank.com 2) 혹시 링크가 바뀔경우 문제 파일 PDF : 2. 설명 1) 요구사항 - Median을 기준으로 보다 작거나 큰 배열에서 각각 Median을 찾아 출력한다. - 입력값은 특정 범위내 자연수이다. 2) 입력값 입력값은 두가지이다. N과 int 배열 1개가 배열 원소의 값이 공백란으로 구분되어 하나씩 입력된다. - 모두 자연수이며 {N | 5 더보기 [hackerrank] s10-basic-statistics Day 0 - Weighted Mean 1. 문제 정보 1) 링크 : https://www.hackerrank.com/challenges/s10-weighted-mean/problem?h_r=next-challenge&h_v=zen Day 0: Weighted Mean | HackerRank Compute the weighted mean. www.hackerrank.com 2) 혹시 링크가 바뀔경우 문제 파일 PDF : 2. 설명 1) 요구사항 - 정의된 weighted mean 값을 출력하되 소수점 한자리수까지만 출력한다. - 입력값은 특정 범위내 자연수이다. 2) 입력값 입력값은 세가지이다. N과 int 배열 2개가 각 배열의 원소의 값이 공백란으로 구분되어 하나씩 입력된다. - 모두 자연수이며 {N | 5 더보기 [hackerrank] s10-basic-statistics Day 0 - Mean, Median, and Mode 1. 문제 정보 1) 링크 : https://www.hackerrank.com/challenges/s10-basic-statistics/problem Day 0: Mean, Median, and Mode | HackerRank Compute the mean, median, mode, and standard deviation. www.hackerrank.com 2) 혹시 링크가 바뀔경우 문제 파일 PDF : 2. 설명 1) 요구사항 - 정의된 Mean 값을 출력하되 소수점 한자리수까지만 출력한다. - 정의된 Median 값을 출력하되 소수점 한자리수까지만 출력한다. - 정의된 Mode 값을 출력한다. - 입력값은 특정 범위내 자연수이다. 2) 입력값 입력값은 두가지이다. N과 int 배열의 값이 하나씩 입.. 더보기 [Algorithm] big O (25 days : Running Time and Complexity) 참고 hackerrank : 30 days of code : 25 #define IS_PRIME "Prime"#define IS_NOT_PRIME "Not prime" bool primeFactor(long no, long factor){ // botbinoo@naver.com return ((no < factor*factor)? true : (no % factor!=0 ? primeFactor(no, factor+1) : false));} int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ // botbinoo@naver.com // prime factor of hackerrank // Not pri.. 더보기 [Algorithm] BT (Binary Tree) & BST (Binary Search Trees) BT (Binary Tree) 자료구조 중 이진 트리라는 것이 있다.트리(Tree) 라는 명칭은 그 모양이 부모로부터 나무뿌리처럼 뻗어나가기 때문에 그렇게 생겼다고 느껴도 괜찮을 것이다.이렇게 뿌리를 내리기 시작하는 최초의 부분을 루트라고 한다.모든 트리구조는 바로 이 루트를 기준으로 뻗어나간다. 주로 객체들이 연결되어 있는데, 연결된 객체를 노드라고 한다.어떻게 가든 결국 루트로 부터 선이 이어져있는 노드들은 루트의 자식이 된다. 새로운 노드(객체)에 연결하는 작업을 입력(insert)로 보고, 연결된 노드(객체)의 이어진 선을 잘라내는 작업을 삭제(delete)로 본다.일반적은 트리는 일단 이렇다. 그런데 이진 트리는, 트리의 개념을 그대로 상속받은 특별한 트리이다.일단 노드가 가질 수 있는 자식노드.. 더보기 [Algorithm] Birthday Cake Candles 안녕하세요. Bot - binoo 입니다. > Hi, I am Bot-binoo. 이번에 풀어볼 문제는 Birthday Cake Candles 입니다. > The problem to solve this time is Birthday Cake Candles. > Header : copyrighted by Bot-binoo. > Post. > Quest.Colleen is turning years old! Therefore, she has candles of various heights on her cake, and candle has height . Because the taller candles tower over the shorter ones, Colleen can only blow out the ta.. 더보기 [Algorithm] Connecting Towns > Quest.Gandalf is travelling from Rohan to Rivendell to meet Frodo but there is no direct route from Rohan (T1) to Rivendell (Tn).But there are towns T2,T3,T4...Tn-1 such that there are N1 routes from Town T1 to T2, and in general, Ni routes from Ti to Ti+1 for i=1 to n-1 and 0 routes for any other Ti to Tj for j ≠ i+1Find the total number of routes Gandalf can take to reach Rivendell from Roha.. 더보기 이전 1 2 다음