본문 바로가기
반응형

전체 글311

이진탐색 (Binary Search) https://blog.naver.com/cncn6666/221885351821 JAVA에서의 이진탐색 (Arrays.binarySearch()) 백준 1920번을 풀면서 JAVA의 이진탐색에 대해 다시 알게 되었다.해당 문제는 입력값이 저장된 배열에 ... blog.naver.com 2020. 4. 10.
Leetcode <Binary Search> 704. Binary Search 50.8% Easy Given a sorted (in ascending order) integer array nums of n elements and a target value, write a function to search target in nums. If target exists, then return its index, otherwise return -1. 해석부터 안됨 예제를 보자 Example 1: Input: nums = [-1,0,3,5,9,12], target = 9 Output: 4 Explanation: 9 exists in nums and its index is 4 Example 2: Input: nums = [-1,0,3,5,9,12], target = 2 Output: -1 Explanation: .. 2020. 4. 10.
우선순위 큐(Priority Queue) https://blog.naver.com/pooojw/221703387961 [알고리즘] 자바(Java) 우선순위 큐(Priority Queue) 우선순위 큐(Priority Queue)일반적인 큐는 가장 먼저 들어간 데이터가 가장 먼저 나오는 구조우선순위 ... blog.naver.com 2020. 4. 5.
Leetcode <Sort> 242. Valid Anagram 백준 6996번 애너그램 백준 6996번 문제랑 똑같음 Leetcode class Solution { public boolean isAnagram(String s, String t) { PriorityQueue heap = new PriorityQueue(); PriorityQueue heap2 = new PriorityQueue(); for(int i=0; i 2020. 4. 5.
Hash Table https://blog.naver.com/nbb_pinetree/221328841725 [algorithm] 해쉬테이블(Hash Table)에 대해 알아보고 구현하기 해쉬테이블(Hash Table) 이란?주어진 를 통해 데이터를 HashCode로 전환하고HashCode를 ... blog.naver.com 2020. 4. 5.
LinkedList https://blog.naver.com/michael_cho77/221575301339 [JAVA] 자바 - 10. 리스트컬렉션 - LinkedList 1. LinkedList LinkedList는 불연속적으로 존재하는 데이터가 서로 링크(연결)되어 있는 형태로 구성되... blog.naver.com 2020. 4. 4.
반응형