Code Monkey home page Code Monkey logo

algorithms's Introduction

About

PS study.

Table of Contents


탐색(Searching)

BFS

Source code

기본적인 너비 우선 탐색을 큐 자료구조를 활용해 구현.

DFS

Source code

기본적인 깊이 우선 탐색을 재귀적으로 구현.

이분 탐색(Binary Search)

Source code

데이터가 정렬 되어있다면 O(log N) 복잡도로 검색할 수 있음.


수학(Math)

확장 유클리드 호제법(EGCD)

Source code

확장 유클리드 호제법을 재귀적으로 구현.

고속 지수 계산(Fast exponent)

Source code

지수 법칙을 활용하면 a^p mod p를 O(log N) 복잡도로 구할 수 있음.

순열(Permutation)

Source code

next_permutation()을 활용하여 벡터의 모든 순열을 구할 수 있음.

행렬의 곱셈(Matrix multiplication)

Source code

2차원 vector를 활용한 행렬의 곱셈.

행렬의 거듭제곱(Matrix Exponentiation)

Source code

2차원 vector, 분할 정복을 활용한 행렬의 거듭제곱 계산.

디오판토스 방정식(Diophantine equation)

Source code

디오판토스 방정식의 일반해 구현.


자료구조(Data structure)

Set

Source code

두개의 Set 자료구조의 합집합을 구하는 예제.

Priority Queue

Source code

pair의 second에 대한 우선순위 큐(최소 힙) 예제


문자열(String)

공백단위로 자르기(Spliting strings by spaces)

Source code

stringstream을 활용하여 문자열을 공백단위로 자르는 예제.

특정 문자로 자르기(Spliting strings by delimiter)

Source code

getline() 과 stringstream을 활용하여 문자열을 특정 구분자로 자를 수 있음.


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.