Ch.1 Basics
·
Java/project lion JSB the origin
Java 프로젝트 JDK란? Java 프로그래밍 언어 ( 기계어: 0과 1로 이루어진 컴퓨터가 이해할 수 있는 언어) high-level language (사람이 이해하기 쉬운 형태의 프로그래밍 언어) C, C++, JS, Python 등도 high-level language에 속함 Java언어도 컴퓨터가 이해할 수 있는 형태의 기계어로 변환되어야 함 Java Bytecode Java 언어를 해석하여 만든 Assembly 언어와 유사한 언어 Java 언어의 소스 코드 파일은 *.java 형태, Bytecode 파일은 *.class 형태로 저장 JVM (Java Virtual Machine) java bytecode를 받아서(읽어서) 기계어로 컴퓨터에 전달(변환) java bytecode: java(프로그..
Week 3 Quiz Review
·
Java/ByteDegree
보호되어 있는 글입니다.
Week 2 Quiz Review
·
Java/ByteDegree
보호되어 있는 글입니다.
Week 1 Quiz Review
·
Java/ByteDegree
보호되어 있는 글입니다.
Sort
·
data structure
sort: to arrange something in an order to use fast algorithms ex. binary search, array should be sorted 1. bubble sort - not used very much (there are a lot of better algorithms) - select first 2 items of an array and compare them > if left is bigger than the right, swap them > do the same with index 1, 2 > repeat …. > when it reaches the end of an array, the first cycle of bubble sort ends > do..
Type of Time Complexity (Big O notation)
·
data structure
1. Constant time complexity constant time algorithm: regardless of input size, number of steps are determined. time complexity = O(1), O(2), … 2. Linear time complexity linear search algorithm has a time complexity of O(N) time complexity = O(N) N: number of inputs linear search algorithm: time complexity = O(N) 3. Quadratic time complexity (2차 시간) - happens when a function has nested loops(중첩 반..
Search Algorithms (Binary Search/ Linear Search)
·
data structure
Algorithms: Search, Sort, …. Linear Search - check from index 0 - linear time complexity: as input size grows, running time also increase in a linear way Binary Search - only works on sorted array - sorted array: items on an array are sorted. adding items on a sorted array takes more time than one that is not - searching process starts from the middle of the array
Array
·
data structure
배열 생성 시 배열의 길이(size)를 지정해야 함 (JS, Python의 경우 언어에서 이 부분을 핸들링해주기 때문에 길이를 지정하지 않고 생성 가능) Characteristics of array - 0-indexed: array’s elements are indexed from 0 - very fast when reading data, but slow in searching/adding/deleting Types of Operation and how it works - Read: give index number of an element and get it > super fast - Search: find the element the user wants > have to check every eleme..