- Today
- Total
목록Algorithm (4)
개성있는 개발자 되기
Stacks A stack is a data structure that uses a principle called Last-In-First-Out (LIFO), meaning that the last object added to the stack must be the first object removed from it. At minimum, any stack, s, should be able to perform the following three operations: Peek: Return the object at the top of the stack (without removing it). Push: Add an object passed as an argument to the top of the sta..
Inheritance in Java Inheritance We use Inheritance to establish a class hierarchy. A class that inherits from some other class (referred to as a superclass) is called a subclass. While a subclass inherits methods and behaviors from a superclass, it can also declare new fields and methods as well as override superclass methods. Now, let's look at these terms in more detail. Subclass We define a s..
문제 6x6 2차원 배열이 주어졌을 경우, hourglasses 를 이루는 영역의 합의 최대값을 구하는 문제이다. 해법. 3x3 마스킹 역할을 하는 포문을 만들고, 그것을 x축으로 3번, y축으로 3번 반복한다. -- PSEUDO CODE INIT int x = 0; int y = 0; WHILE y < 4 WHILE x < 4 FOR i=0. i