Code Monkey home page Code Monkey logo

Comments (2)

ttobaegi avatar ttobaegi commented on July 20, 2024
  • 합 또는 곱을 저장해야하는 배열일 경우 0N-1보다 1N 까지로 범위를 정하는 것이 편하다.

  • Ex) S[N] = A[N] + S[N-1];

  • 런타임에러가 나는 이유의 대부분은 배열크기를 잘못 잡았기 때문이다.

    • 재귀함수를 많이 호출해도 발생(스택오버플로우)
  • while 문은 쓰기에 편리하지만 조건갱신을 깜박하면 무한루프가 된다.

  • while(i > 0) { ~~ i++ 를 빼먹는경우 }

  • 변수타입이 차지하는 메모리공간이 무엇인지 정확히 기억하자

  1. bool, char : 1바이트
  2. int, long : 4바이트
  3. long long, double : 8바이트

from coding-test.

ttobaegi avatar ttobaegi commented on July 20, 2024
  • 스트링
  • 스트링을 받았을 경우 마지막에 '\0' 은 자동으로 포함된다.
  • for(int i = 0; s[i]; i++) 로 사용 가능
  • i++ 나 ++i 은 가능하면 쓰지말자.
  • i+=1; 로 명확히 하는것이 좋음
  • 동적할당은 가능하면 쓰지말자
  • 예외케이스를 찾아야한다.
  • 경계값
  • 가장 최소개수, 최대개수
  • 0, 음수
  • 변수메모리 오버플로우
  • 수도코드를 먼저 작성하자(주석으로 간단히 해도 좋음)
  • 알고리즘을 공부할때는 다음을 기억하면서 공부하자
    • 시간복잡도
    • 성립하는 조건
    • 예외처리

from coding-test.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.