전체 글

    시간 복잡도 (Time Complexity)

    시간복잡도(Time Complexity) 입력의 크기와 문제를 해결하는데 걸리는 시간의 상관관계 알고리즘 문제를 풀 때 단순히 '복잡도'라고 하면 보통 시간복잡도를 의미한다. 코딩 테스트에서의 '시간 제한'은 작성한 프로그램이 모든 입력을 받아 이를 처리하고 실행 결과를 출력하는 데까지 걸리는 시간을 의미 빅오표기법(Big-O Notation) 주어진 식을 값이 가장 큰 대표항만 남겨서 나타내는 방법 즉 함수의 상한만을 나타낸다. O(N) : 5N + 3, 2N + 10lgN, 10N O(N^2) : N^2 + 2N + 4, 6N^2 + 20N + 10lgN O(NlgN) : NlgN + 30N + 10, 5NlgN + 6 O(1) : 5, 16, 36 예를 들어 N개의 데이터가 있을 때, 모든 데이터의..

    복잡도

    복잡도(Complexity)란? 복잡도 = 알고리즘의 성능을 나타내는 척도 복잡도는 두 가지로 나눌 수 있다. 시간 복잡도(Time Complexity) 특정한 크기의 입력에 대하여 알고리즘이 얼마나 오래 걸리는지를 의미 알고리즘을 위해 필요한 연산의 횟수 공간 복잡도(Space Complexity) 특정한 크기의 입력에 대하여 알고리즘이 얼마나 많은 메모리를 차지하는지 의미 알고리즘을 위해 필요한 메모리의 양 512MB = 1.2억개의 int 동일한 기능을 수행하는 알고리즘이 있다면 일반적으로 복잡도가 낮을수록 좋은 알고리즘이다. 출처 : 이것이 취업을 위한 코딩 테스트다 with 파이썬 (나동빈 저)

    Eclipse 프로젝트 Import

    프로젝트를 압축해서 workspace에 옮겼는데 eclipse에서 확인하지 못하는 경우 file -> import -> general -> Existing Projects into WorkSpace -> next 성공적으로 프로젝트를 import 하였다.

    char 자료형에 '' (빈문자)로 초기화 할 수 없는 이유

    https://www.linuxquestions.org/questions/programming-9/empty-char-in-java-95407/ empty char in java Programming This forum is for all programming questions. The question does not have to be directly related to Linux and any language is fair game. Notices Welcome to LinuxQuestions.org, a friendly and active Linux Community. You are currently viewing LQ as www.linuxquestions.org https://linuxhint...

    Integer.toString() vs String.valueOf()

    Integer.toString vs String.valueOf 두 함수 모두 int 즉 정수 자료형을 String으로 변경하는 메서드다. 그렇다면 두 함수간 어떤 차이가 있는지 알아보자. https://www.baeldung.com/java-tostring-valueof Integer.toString() vs String.valueOf() in Java | Baeldung Learn about the Integer.toString() and String.valueOf() methods. www.baeldung.com String Class 일부 /** * Returns the string representation of the {@code int} argument. * * The representatio..

    Casting

    1. 수의 변환 정수 실수 /* * null * type mismatch * type mismatch없이 에러 */ package kr.co.dong; public class CastTest { public static void main(String[] args) { // 타입 변환 (형 변환) 선언 후 값 입력시 int int_num = 30; float float_num = 3.0f; long long_num = 0L; // 정수를 실수로 치환 float_num = int_num;// (float)int_num 생략가능 // 실수를 정수로 바꾸기 int_num = (int)float_num;// casting // unicode | ASCII code int_num = 48; System.out.pr..