@SpringBootConfiguration - @Configuration과 같음. Bean을 등록하는 Java 설정파일(@Component, @Service, @Repository, @Controller, @Configuration annotation 이 붙은 method 를 @Autowired로 bean을 생성할 수 있다.)이며 @Configuration 자신도 bean으로 등록된다. @ComponentScan - The first stage to read Bean. - @Component,@Configuration,@Repository,@Service,@Controller,@RestController 를 가진 Class 들을 scan해서 bean으로 등록한다. - 다 같은 이름으로 하지 않고 저렇게..
같은 숫자는 싫어 문제 설명 배열 arr가 주어집니다. 배열 arr의 각 원소는 숫자 0부터 9까지로 이루어져 있습니다. 이때, 배열 arr에서 연속적으로 나타나는 숫자는 하나만 남기고 전부 제거하려고 합니다. 배열 arr에서 제거 되고 남은 수들을 return 하는 solution 함수를 완성해 주세요. 단, 제거된 후 남은 수들을 반환할 때는 배열 arr의 원소들의 순서를 유지해야 합니다. 예를들면 arr = [1, 1, 3, 3, 0, 1, 1] 이면 [1, 3, 0, 1] 을 return 합니다. arr = [4, 4, 4, 3, 3] 이면 [4, 3] 을 return 합니다. 배열 arr에서 연속적으로 나타나는 숫자는 제거하고 남은 수들을 return 하는 solution 함수를 완성해 주세요...
문제 설명 대문자와 소문자가 섞여있는 문자열 s가 주어집니다. s에 'p'의 개수와 'y'의 개수를 비교해 같으면 True, 다르면 False를 return 하는 solution를 완성하세요. 'p', 'y' 모두 하나도 없는 경우는 항상 True를 리턴합니다. 단, 개수를 비교할 때 대문자와 소문자는 구별하지 않습니다. 예를들어 s가 pPoooyY 면 true를 return하고 Pyy 라면 false를 return합니다. 제한사항 문자열 s의 길이 : 50 이하의 자연수 문자열 s는 알파벳으로만 이루어져 있습니다. 입출력 예 s answer pPoooyY true Pyy false Solution in Java public class Main { public static void main(String[..
문제 설명 문자열 s의 길이가 4혹은 6이고, 숫자로만 구성되있는지 확인해주는 함수, solution을 완성하세요.예를들어 s가 a234 이면 False를 리턴하고 1234 라면 True를 리턴하면 됩니다. 제한 사항 s는 길이 1 이상, 길이 8 이하인 문자열입니다. 입출력 예 s return a234 false 1234 true Solution in Java 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 class Solution { public boolean solution(String s) { boolean answer = true; if(s.length() == 4 || s.length() == 6){ if( s.matches("^[0-9]*$")){ return answer;..
Algorithm & Data structure What are Algorithms and Data structures? The data structure is those different ways of storing data on your program. e.g. Array, List, Stack, Queue, Tree, Hash etc, The algorithm is operations on different data structures + sets of instructions for executing them. e.g. Sort, Search, Max, Min etc, Let's see the image to get a concrete example. We can see alphabet A to E..
String class in java - case sensitive (lower case gives an error)- no need 'new' keyword - It restricts the creation of a string instance consisting of the same string.- It does not allow changes to the data in the String instance. If you want to make variables that hold the strings, you need to create object first. 1234567class Student{ public static void main(String[] args) { String hello = ne..
- Total
- Today
- Yesterday
- 프로그래머스 알고리즘
- hackerrank
- repeat()
- 프로그래머스 알고리즘문제
- compareTo()
- rest parameter
- algorithm
- C++
- 알고리즘
- javascript
- java
- HackerRank Algorithm
- Javascript Algorithm
- 프로그래머스
- string class in java
- easy algorithm
- HashMap
- code refactoring
- hackerrank javascript
- math.abs
- equals()
- Object type casting
- ... in Javascript
- Collection Framework
- substring()
- spring boot application
- easy javascript algorithm
- hackerrank javascript solution
- hackerrank solution
- math.max
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |