관리 메뉴

Silver Library (Archived)

Big o Notation - Exponential, polunomial? 본문

Fundamental of CS/Cracking tech interview for hippie

Big o Notation - Exponential, polunomial?

Chesed Kim 2022. 11. 9. 22:14
반응형

수학 적 용어 설명은 아래 링크를.

 

Polynomials

Polynomials A polynomial looks like this: example of a polynomial this one has 3 terms Polynomial comes from poly- (meaning "many") and -nomial (in this case meaning "term") ... so it says "many terms" Polynomials with one variable make nice smooth curves:

www.mathsisfun.com

 

Leetcode 를 고려한 기록.

적어도 O(n), 2 log n 같은 걸 어떻게 해석하는 지 정도는 알겠습니다.

이제, 남은건 Big O notation 에서 크게 

1. runtime 은 무엇인가.

2. recursive 로 할 경우, runtime은? (예: n - 1)

등이 있었는데, 그 leetcode 에서 나오던 것들이 이 책에 있던 내용이었는지도 모르겠다는 생각이 드네요.

 

아직은 매일 저녁마다 해보는 수준에서 그치고 있지만, 확실한 건 그냥 막연하게 '어째서 저런 답이 나왔을까' 추적 해 보면서 답을 두고 온갖 생각을 다 해보는 것 보다는.

 

Big o Notation 을 정말 이해하고, 그 문제를 보고, 그 문제에 맞는 Big o notation 유형의 코드를 구성 해 주면 된다.

라는 결론이 나왔습니다.

 

비고.

Cracking the coding interview 6th edition 를 참고했습니다.

 

Big o Notation 요약.

 

'Fundamental of CS > Cracking tech interview for hippie' 카테고리의 다른 글

Two sum - javascript  (0) 2022.11.09