본문 바로가기

Algorithm

(177)
Aracade Intro #26 evenDigitsOnly. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Aracade Intro #26 evenDigitsOnly. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Q. Check if all digits of the given integer are even. 모든 자릿수 숫자가 짝수인지 확인하라 e.g. Input -> n = 248622 Output -> evenDigitsOnly(n) = true Input -> n = 642386 Output -> evenDigitsOnly(n) = false //처리과정//1. 정수를 입력받는다.//2. 정수의 자릿수 시작부터 끝까지 반복한다.// 2.1. 숫자가 짝수인지 확인한다.//3. 결과를 리턴한다. /..
LeetCode problem #2 Add Two Numbers. Algorithm, 알고리즘, 코딩 문제풀이, LeetCode, 릿코드, 기술면접, CodeFights, CodeSignal, 코드파이트, 코드시그널, c++ java c# LeetCode problem #2 Add Two Numbers. Algorithm, 알고리즘, 코딩 문제풀이, LeetCode, 릿코드, 기술면접, CodeFights, CodeSignal, 코드파이트, 코드시그널, c++ java c# Q.You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list. You may assume the two numbers do not cont..
Save matrix data to excel in matlab (맷랩 매트릭스 데이터 엑셀에 저장하는 방법) Save matrix data to excel in matlab (맷랩 매트릭스 데이터 엑셀에 저장하는 방법) 공식 문서 ( 여기 ) Official docs ( Here ) e.g. 1. 가장 기본적인 sheet 1 번에 값 저장 filename = 'testdata.xlsx'; A = [12.7 5.02 -98 63.9 0 -.2 56]; xlswrite(filename,A) 2. Sheet 번호와, cell 위치를 지정해서 값 저장 filename = 'testdata.xlsx'; A = {'Time','Temperature'; 12,98; 13,99; 14,97}; sheet = 2; xlRange = 'E1'; % 'C1:E1' 과 같이 범위 지정 가능 xlswrite(filename,A,she..
Aracade Intro #24 minesweeper. Algorithm, 알고리즘, Codefights, CodeSignal, regx, 정규표현식, 코드파이트, 코드시그널, c++ java c# scalar Aracade Intro #24 minesweeper. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, c++ java c# scalar Q. In the popular Minesweeper game you have a board with some mines and those cells that don't contain a mine have a number in it that indicates the total number of mines in the neighboring cells. Starting off with some arrangement of mines we want to create a Minesweeper game setup. 지뢰찾기 게임에..
Difference between Char and Varchar in Database datatype, 데이터베이스 자료형 Varchar 와 Char 의 차이점 Difference between Char and Varchar in Database datatype, 데이터베이스 자료형 Varchar 와 Char 의 차이점 I got this article from ( here ) 원문보기 ( here ) Difference between Char and Varchar Data Type ‘Char’ is a fixed-length data type which is used to store character string value of fixed length, whereas ‘Varchar’ is a variable-length data type which is used to store variable length alphanumeric data. 'Char' 은 고..
Apache POI library excel file, Mat in OpenCV to Excel file / 아파치 POI 라이브러리 엑셀파일 쓰기 OpenCV Mat 에서 엑셀파일 만들기 (java, c++) Apache POI library excel file, Mat in OpenCV to Excel file / 아파치 POI 라이브러리 엑셀파일 쓰기 OpenCV Mat 에서 엑셀파일 만들기 (java, c++) Java 에서 OpenCV 를 이용하여 Mat data를 만들었을 때 POI로 엑셀 저장을 하기 위한 메소드 Method for saving Mat data in Java OpenCV using POI 설명 저장할 excel 파일 경로+이름(absolutePath) 과, 저장할 Mat 을 입력받는다.Mat 의 channel 은 sheetrows 는 rowcols 는 cell (엑셀에서) 저장 잘된다. Description Input absolutePath of file we wanna save (..
Java Math class - squareRoot, power num example / 자바 - 루트, 제곱 값 예제 Java Math class - squareRoot, power num example / 자바 - 루트, 제곱 값 예제 squareRoot - 제곱근 (루트 씌운 값) power - 거듭제곱 두개 다 Math 클래스에서 바로 호출해서 사용 가능하다. Both can be used in Math class in Java e.g. Math.sqrt(value); Math.pow(value, intNum); Code.. lemme see code..... 코드.. 코드를 보자......... public static void main(String[] args) { int testNum1 = 16;float testNum2 = 625f;double testNum3 = 169;System.out.println("..
Aracade Intro #22 avoidObstacles. Algorithm, 알고리즘, Codefights, CodeSignal, regx, 정규표현식, 코드파이트, 코드시그널, c++ java c# scalar Aracade Intro #22 avoidObstacles. Algorithm, Codefights, CodeSignal, regx, 정규표현식, 코드파이트, 코드시그널, c++ java c# scalar Q. You are given an array of integers representing coordinates of obstacles situated on a straight line. Assume that you are jumping from the point with coordinate 0 to the right. You are allowed only to make jumps of the same length represented by some integer. Find the minimal len..