HackerRank Mark and Toys

1. 문제 Mark and Jane are very happy after having their first child. Their son loves toys, so Mark wants to buy some. There are a number of different toys lying in front of him, tagged with their price

HackerRank 2d Array ds

1. 문제 1.1. Given a 2D Array, : 1 1 1 0 0 0 0 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 An hourglass in is a subset of values with indices falling in this pattern in 's graphical re

HackerRank Counting Valleys

1. 문제 An avid hiker keeps meticulous records of their hikes. During the last hike that took exactly steps, for every step it was noted if it was an uphill, , or a downhill, step. Hikes always start

HackerRank Repeated String

1. HackerRank Repeated String There is a string, , of lowercase English letters that is repeated infinitely many times. Given an integer, , find and print the number of letter a’s in the first lette

HackerRank Jumping on the clouds

1. 문제 There is a new mobile game that starts with consecutively numbered clouds. Some of the clouds are thunderheads and others are cumulus. The player can jump on any cumulus cloud having a number t

HackerRank Sales By Match

1. 문제 There is a large pile of socks that must be paired by color. Given an array of integers representing the color of each sock, determine how many pairs of socks with matching colors there are. Ex

HackerRank Grading Students

Grading Students 1. 문제 HackerLand University has the following grading policy: Every student receives a in the inclusive range from to . Any less than is a failing grade. Sam is a professor at th

3. Template Method Pattern

1. Template Method Pattern 알고리즘의 구조를 메소드에 정의하고 하위 클래스에서 알고리즘 구조의 변경없이 알고리즘을 재정의 하는 패턴 2. 언제 사용할까? 구현하려는 알고리즘이 일정한 프로세스가 있다. 구현하려는 알고리즘이 변경가능성이 있다. 3. Process 알고리즘을 여러 단계로 나눈다. 나누어진 알고리즘의 단계를 메소드로

2.Adapter Design Pattern

1. Adapter Pattern 연관성 없는 두 객체를 묶어서 사용한다. 2. 학습 목표 알고리즘을 요구사항에 맞춰 사용할 수 있다. 2.1. 의미 Adapter는 사전적의미로는 기계 기구등을 다목적으로 사용하기 위한 부가 기구라고 할 수 있습니다. 2.2. 기본 설계 2.3. 요구사항 1 두 수에 대한 다음 연산을 수행하는 객체를 만들기 수

1.Strategy Design Pattern

1. 학습목표 Interface Delegate Strategy Pattern 1.1. Interface 키보드나 디스플레이 따위 처럼 사람과 컴퓨터를 연결하는 장치 기능에 대한 선언과 구현을 분리 기능을 사용 통로 기능을 기능의 선언과 기능의 구현을 분리할 수 있는 기능을 제공한다. 1.2. Delegate 특정 객체의 기능을 사용하기 위하여