해커랭크

Programming/Algorithm

[30 Days of Code] 0: Hello, World

Objective In this challenge, we review some basic concepts that will get you started with this series. You will need to use the same (or similar) syntax to read input and write output in challenges throughout HackerRank. Check out the Tutorial tab for learning materials and an instructional video! Task To complete this challenge, you must save a line of input from stdin to a variable, print Hell..

Programming/Algorithm

[Hackerrank] JumpingOnClouds - java

Hackkerank의 Interview prepare ket 중 Warm-up Challenges의 JumpingOnClouds 문제 풀이 Java 코드 [제약] - 점프는 현재 현재 인덱스에서 1 또는 2 증가한 인덱스까지만 가능. - 점프 가능한 구름의 값은 0, 피해야 하는 구름의 값은 1. - 구름을 통과할 수 있는 최소 점프 수를 구하라. [전략] - 최소 점프 수 이므로, 뛸 수 있는 최대 거리(2)를 우선적으로 탐색 - 최소 점프가 2므로, 피해야 하는 구름은 연속으로 있을 수 없다. (ex: 0 1 1 ) public class JumpingOnTheCloud { // Complete the jumpingOnClouds function below. static int jumpingOnClo..

JohnMark
'해커랭크' 태그의 글 목록