Processing math: 100%
no image
스트라센 알고리즘(Strassen Algorithm) - 행렬곱
기본 행렬곱// pseudocode(의사코드)for i from 1 to n: // A의 행(1부터 n까지) for j from 1 to n: // B의 열(1부터 n까지) C[i][j] = 0 // C의 각 원소 초기화 for k from 1 to n: // A의 열과 B의 행(k는 1부터 n까지) C[i][j] = C[i][j] + A[i][k] * B[k][j] end for end for end for행렬곱의 기본 연산은 중첩문이 3개로 O(n^3) 시간복잡도가 필요하다. 스트라센(Strassen) 행..
2025.03.02
no image
Sorting Algorithm
Sorting algorithm 모음Insertion Sort (삽입 정렬)의사 코드 구현 코드public class InsertionSort { static void insertionSort(int[] input) { int count = 0; // 반복 도는 횟수 확인 for (int j = 1; j -1 && input[i] > key) { count++; input[i + 1] = input[i]; i -= 1; } input[i + 1] = key; } System.out.println(count); } pub..
2025.02.24
no image
LeetCode Top Interview Questions - easy collection
https://leetcode.com/explore/interview/card/top-interview-questions-easy/leetcode top interview questions - easy collection을 풀면서 기록ArrayRotate Imagehttps://leetcode.com/explore/interview/card/top-interview-questions-easy/92/array/770/ in-place, which means you have to modify the input 2D matrix directly. Do NOT allocate another 2D matrix and do the rotation.in-place algorithm은 input data structu..
2025.02.16
no image
프로그래머스 21kakao_blind 순위검색(python)
https://school.programmers.co.kr/learn/courses/30/lessons/72412 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr from bisect import bisect_left def solution(info, query): a = {"java":"0", "cpp":"1", "python":"2"} b = {"backend":"0", "frontend":"1"} c = {"junior":"0", "senior":"1"} d = {"chicken":"0", "pizza":"1"} results = [] for i in..
2024.03.28
no image
릿코드 2. Add Two Numbers, 49. Group Anagrams
문제 2. https://leetcode.com/problems/add-two-numbers/description/?envType=study-plan-v2&envId=top-interview-150 LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 접근 문제에서 제시한 singly-linked list 구조에 맞춰 알고리즘을 풀어나가는 문제였다. 처음에 순서를 ..
2024.02.17
no image
릿코드 134. Gas Station, 135. Candy
문제 134. https://leetcode.com/problems/gas-station/description/?envType=study-plan-v2&envId=top-interview-150 LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 135. https://leetcode.com/problems/candy/description/?envType=stud..
2024.02.09
no image
릿코드 238. Product of Array Except Self
문제 https://leetcode.com/problems/product-of-array-except-self/description/?envType=study-plan-v2&envId=top-interview-150 LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 접근 나누기를 하지 않고 O(n) 연산을 하라는 것에 아이디어가 안떠올랐다. Discussion ..
2024.02.06
no image
릿코드 45. Jump Game II
문제 링크 https://leetcode.com/problems/jump-game-ii/description/?envType=study-plan-v2&envId=top-interview-150 LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 접근 마지막 인덱스에 도달할 수 없는 case는 없다. 그래서, (마지막 인덱..
2024.02.04
no image
릿코드 55. Jump Game
문제 https://leetcode.com/problems/jump-game/description/?source=submission-noac LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 접근 DP를 생각했다. An까지 점프할 수 있는 An1,An4,An7.... 이 있다면 An1까지 점프할 수 있..
2024.02.02