본문 바로가기

class

(33)
Aracade Intro #57 fileNaming. Algorithm,알고리즘,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive Aracade Intro #57 fileNaming. Algorithm,알고리즘,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive Recursive solotion재귀풀이 Q. You are given an array of desired filenames in the order of their creation. Since two files cannot have equal names, the one which comes later will have an addition to its name in a form of (k), where k is the smallest positive integer such that the obt..
Aracade Intro #56 digitsProduct. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제,문제해결능력,example, c++ java c# scalar Aracade Intro #56 digitsProduct. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제,문제해결능력,example, c++ java c# scalar 문제가 너무 그지같은데.. 풀긴 풀었었으나, 다시 보니까 다시 깔끔하게 정리할 필요가 없을 것 같아서 그냥 풀 당시에 쓴 처리과정 그대로 옮겨넣어둠. It was the worst question ever, so I didn't solve again and order it. Just copied solution and process i did before. Q. Given an integer product, find the smallest positive (i.e. greater t..
Aracade Intro #55 differentSquares. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제,문제해결능력,example, c++ java c# scalar Aracade Intro #55 differentSquares. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제,문제해결능력,example, c++ java c# scalar Q. Given a rectangular matrix containing only digits, calculate the number of different 2 × 2 squares in it. 숫자만 들어있는 주어진 매트릭스에서, 각기 안에 다른 숫자를 가진 2x2 사이즈 사각형의 개수를 구하여라. e.g. Input -> matrix = [[1, 2, 1], [2, 2, 2], [2, 2, 2], [1, 2, 3], [2, 2, 1]] Output -> differentSq..
How to access controller from existing Pane in JavaFX, pane에서 해당 controller로 접근하기, java/cpp/c++/fx/gui How to access controller from existing Pane in JavaFX, pane에서 해당 controller로 접근하기, java/cpp/c++/fx/gui Q. Pane에서 직접 해당 Controller를 뽑아낼 수 없다.Pane 에서 Scene을 통해 FxmlLoader를 뽑아내는 방법이 있고, 그 후 loader를 통해서Controller를 가져올 수 있다. 예제 코드를 보자 We cannot get Controller from Pane directly, so i struggled some. After bringing Scene, then we could get FxmlLoader from Scene. So it can get Controller. e.g. FXMLLoad..
Aracade Intro #32 absoluteValuesSumMinimization. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Aracade Intro #32 absoluteValuesSumMinimization. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Q. Given a sorted array of integers a, find an integer x from a such that the value of abs(a[0] - x) + abs(a[1] - x) + ... + abs(a[a.length - 1] - x) is the smallest possible (here abs denotes the absolute value).If there are several possible answers, output the..
Aracade Intro #30 circleOfNumbers. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Aracade Intro #30 circleOfNumbers. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Q. Consider integer numbers from 0 to n - 1 written down along the circle in such a way that the distance between any two neighboring numbers is equal (note that 0 and n - 1 are neighboring, too). Given n and firstNumber, find the number which is written in the radially oppos..
C++ How to convert string to integer in C++, string 에서 int 변환하는 방법, Easiest way to convert string to int. C++ How to convert string to integer in C++, string 에서 int 변환하는 방법, Easiest way to convert string to int. 반대로 바꾸는 함수는 아래에 링크로 가보세요~ ~ integer to string function ( Here ) c++ string 자료형에서 integer 으로 string형 숫자를 integer 로 저장 문제풀이 연습하는 사이트 같은데서는 c++을 주로 쓰는데 만이 쓰지만 항상 까먹어서 적어둠 I use sometimes this method, especially in codefights or leetcode when i'm using c++.. always confusing. Code.. lemme see co..
Aracade Intro #29 chessBoardCellColor. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Aracade Intro #29 chessBoardCellColor. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Q. Given two cells on the standard chess board, determine whether they have the same color or not. 체스판에서 주어진 두개의 셀이, 같은 색깔인지 아닌지 확인하라. e.g. For cell1 = "A1" and cell2 = "C3", the output should bechessBoardCellColor(cell1, cell2) = true. For cell1 = "A1" and cell2 = "H3", ..