동엽코딩
Home
Write
Setting
About Me
All
(176)
🌠Development
(54)
SpringBoot
(14)
Android Studio
(9)
QT
(26)
html, css
(5)
📁 DataBase
(0)
📖Algorithm
(94)
Library
(8)
Simulation, Math
(39)
Stack
(4)
Queue
(2)
DP
(3)
DFS & BFS
(14)
BackTracking
(5)
Greedy
(1)
Binary Search
(6)
Graph
(0)
Prefix Sum
(4)
TwoPointer
(3)
Sliding Window
(2)
Brute Force
(2)
🔊 Language
(9)
JAVA
(0)
C++
(9)
⚡Electrical Engineering
(14)
반도체
(13)
전기전자
(1)
Github
(3)
Total :
Today :
Yesterday :
Dark
자바 [Programmers] 1단계 - 정수 제곱근 판별
class Solution { public long solution(long n) { long answer = 0; answer = -1; for(long i=1; i*i
2024.02.18
📖Algorithm/Simulation, Math
자바 [Programmers] 1단계 - 문자열 내 p와 y의 개수
class Solution { boolean solution(String s) { boolean answer = true; s = s.toLowerCase(); int p=0; int y=0; for(int i=0; i
2024.02.18
📖Algorithm/Simulation, Math
자바 [Programmers] 1단계 - 자연수 뒤집어 배열로 만들기 (Integer.parseInt(), String.valueOf(), str.substring())
class Solution { public int[] solution(long n) { String str = String.valueOf(n); int[] answer = new int[str.length()]; for(int i=0; i
2024.02.18
📖Algorithm/Simulation, Math
자바 [Programmers] 1단계 - 자릿수 더하기
public class Solution { public int solution(int n) { int answer = 0; while(n > 0){ answer += n%10; n/=10; } return answer; } } 맨 뒷자리 1의 자리부터 구해주면 쉽게 풀 수 있다. 입력 : 123 1단계 answer + = n%10 => (3) n / = 10 => (12) 2단계 answer + = n%10 => (2)n /= 10 => (1) 3단계 answer += n%10 => (1) n / 10 => (0) answer == 3 + 2 + 1 => 6
2024.02.18
📖Algorithm/Simulation, Math
자바 [Programmers] 1단계 - 평균 구하기
class Solution { public double solution(int[] arr) { double answer = 0; double sum=0; for(int i=0; i
2024.02.18
📖Algorithm/Simulation, Math
자바 [Programmers] 1단계 - 문자열을 정수로 바꾸기 (Integer.parseInt())
class Solution { public int solution(String s) { return Integer.parseInt(s); } } 문자열을 Integer형으로 바꾸는 문제이다. Integer.paserInt() 내장함수를 사용하면 쉽게 풀 수 있다.
2024.02.18
📖Algorithm/Simulation, Math
자바 [Programmers] 1단계 - 나머지가 1이 되는 수 찾기
class Solution { public int solution(int n) { int answer = 0; for(int i=1; i
2024.02.18
📖Algorithm/Simulation, Math
자바 [Programmers] 1단계 - 짝수와 홀수
class Solution { public String solution(int num) { return (num % 2 == 0) ? "Even" : "Odd"; } } 아주 기초적인 문제..
2024.02.18
📖Algorithm/Simulation, Math
Prev
1
···
8
9
10
11
12
Next
티스토리툴바