SECTION
[Codewar] Roman Numerals Helper
PS/Codewar 2022. 1. 4. 13:58

https://www.codewars.com/kata/51b66044bce5799a7f000003 Codewars: Achieve mastery through coding challenge Codewars is a coding practice site for all programmers where you can learn various programming languages. Join the community and improve your skills in many languages! www.codewars.com Create a RomanNumerals class that can convert a roman numeral to and from an integer value. It should follo..

[Algorithm] Recursion(재귀) 알고리즘
PS/Algorithm 2020. 4. 6. 22:40

- Recursion 알고리즘 : 모든 리커젼은 아래 틀을 이용한다. : 아래 틀을 이용해서 리커젼 문제들을 연습하자. if ( 종료 조건 ) return 종료 값 else if ( 또 다른 종료 조건 ) return 또 다른 종료 값 else return ( 몇 가지 작업 ) and then ( 재귀 호출 ) : 모든 리커젼 기법은 반복문으로 작성할 수 있다. - 재귀 vs 반복 (1) 일반적으로 반복 방식이 재귀보다 성능면에서 효율적이다. ( 재귀 방식은 함수 호출의 오버헤드가 크다. ) (2) 그럼에도 재귀를 쓰는 이유는 몇몇 문제에서 명확한 반복 알고리즘이 존재하지 않을 수 있다. 또한 몇몇 문제에서 반복적인 방법들 보다 재귀적인 해결책이 가장 적합할 수 있다. (3) 재귀 코드는 반복 코드보다 ..

[Codewar] Path Finder #1: can you reach the exit?
PS/Codewar 2020. 3. 28. 22:44

https://www.codewars.com/kata/5765870e190b1472ec0022a2/java Codewars: Train your coding skills Codewars is where developers achieve code mastery through challenge. Train on kata in the dojo and reach your highest potential. www.codewars.com Task You are at position [0, 0] in maze NxN and you can only move in one of the four cardinal directions (i.e. North, East, South, West). Return true if you ..

[Codewar] Snail
PS/Codewar 2020. 3. 15. 23:23

https://www.codewars.com/kata/521c2db8ddc89b9b7a0000c1/java Codewars: Train your coding skills Codewars is where developers achieve code mastery through challenge. Train on kata in the dojo and reach your highest potential. www.codewars.com Snail Sort Given an n x n array, return the array elements arranged from outermost elements to the middle element, traveling clockwise. array = [[1,2,3], [4,..

[Codewar] Twice linear
PS/Codewar 2020. 3. 14. 23:43

https://www.codewars.com/kata/5672682212c8ecf83e000050/java Codewars: Train your coding skills Codewars is where developers achieve code mastery through challenge. Train on kata in the dojo and reach your highest potential. www.codewars.com Consider a sequence u where u is defined as follows: The number u(0) = 1 is the first one in u. For each x in u, then y = 2 * x + 1 and z = 3 * x + 1 must be..

검색 태그