본문 바로가기

leetcode

(151)
OpenCv, How to create/initialize mat in CV for Java, 매트릭스 생성/초기화, 자바, c++, JavaCv OpenCv, How to create/initialize mat in CV for Java, 매트릭스 생성/초기화, 자바, c++, JavaCv Imma post basic 3 way to initialize Mat in javaCv openCv 자바에서 자주 쓰이는 3가지 생성자 겸 초기화 함수 Example code예제코드 public static void main(String[] args){// load the OpenCV native librarySystem.loadLibrary(Core.NATIVE_LIBRARY_NAME);// create and print on screen a 3x3 identity matrixSystem.out.println("Create a 3x3 identity mat..
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 #31 depositProfit. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Aracade Intro #31 depositProfit. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Q. You have deposited a specific amount of money into your bank account. Each year your balance increases at the same growth rate. With the assumption that you don't make any additional deposits, find out how long it would take for your balance to pass a specific threshold. Of ..
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..
How to initialize vector in C++ STL (Standard Template Library), STL 벡터 초기화 방법 How to initialize vector in C++ STL (Standard Template Library), STL 벡터 초기화 방법 제일 간단한 3가지만Simplest way to initialize vector in c++ 1 - 벡터를 만들면서 즉시 값을 넣어서 초기화 2 - 벡터를 만들어두고 넣고 싶은 값을 넣어서 초기화 3 - 넣을 배열이 있다면, 벡터를 만들며 배열을 옮겨 넣으며 초기화 // 1 - Initialize when you make vector 2 - Initialize after making vector 3 - Initialize when you make vector using array you made before it int main(int argc, char*(*arg..
OpenCV Java/C++ FourierFastTransferShift(fftshift) 푸리에 변환 후 위치 재설정 함수 (Matlab - fftshift) - (2) OpenCV Java/C++ FourierFastTransferShift(fftshift) 푸리에 변환 후 위치 재설정 함수 (Matlab - fftshift) - (2) I posted circShift method(below) what i coded few days ago, but it's new code using OpenCV core function a lot. Reference ( Here ) 2018/10/02 - [Programming/Image Processing] - OpenCV Java/C++ FourierFastTransferShift(fftshift) 푸리에 변환 후 위치 재설정 함수 (Matlab - fftshift) - (1) Performance that i coded this..
Aracade Intro #28 alphabeticShift. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Aracade Intro #28 alphabeticShift. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Q. Given a string, replace each its character by the next one in the English alphabet (z would be replaced by a). (Lowercase alphabet only) 주어진 문자열에서, 각 알파벳을 그 다음 알파벳으로 바꾸어라 ( a->b, c->d ) z 의 경우에는 다시 a 로 돌아간다. (전부 소문자 알파벳) e.g. Input -> inputString = "crazy" Output -> alphab..
Aracade Intro #27 variableName. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Aracade Intro #27 variableName. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Q. Correct variable names consist only of English letters, digits and underscores and they can't start with a digit. Check if the given string is a correct variable name. 변수명으로 옳은 것은 알파벳, 숫자, 언더바로만 이루어져 있고, 시작은 숫자로 할 수 없다.옳은 변수명인지 확인하라. e.g. For name = "var_1__Int", the output s..