donaricano-btn

스택(Stack) - 간단자바예제(Simple in java)


1. 스택(Stack)

- Push : 탑에 객체가 쌓인다(add)

- Pop : 탑에 객체가 없어진다(remove)

- Peek : 탑의 값을 가져온다


2. 구현

1) 변수 초기화


2) push() and isStackFull()

 

3). pop() and isStackEmpty()

 

4) peek()

 

5) main()

 

블로그 이미지

리딩리드

,
donaricano-btn

OneNumber(한수)


1. Question    

- There is a integer X

- X has digit that is made of arithmetical sequence like 123, 468, 369

- You enter a number N( 1 <= N <=1000)

- To get a count of X within 1 <= N 

2. Solution

블로그 이미지

리딩리드

,
donaricano-btn

SelfNumber


1. Question

- If you start with 33, the next number is 33 + 3 +3 = 39, the next is 39 + 3 + 9 = 51 and so you generate the sequence

33, 39, 51, 57....

- d(n) n is called a generator of d(n)

- Some numbers have more than one generator

- A number with no generators is a self-number

- Write a program to output all positive self-numbers less than 10000 in increasing order, one per line


2. Solution

블로그 이미지

리딩리드

,
donaricano-btn

SmallerThanX


1. Question

1) There is two numbers N and X in the first low

2) In the second low, You should enter A progression, Size of A progression will be N

3) To print out numbers that is smaller than X  


2. Solution


https://github.com/KyleJeong/Algorithm
블로그 이미지

리딩리드

,