| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- 109. Convert Sorted List to Binary Search Tree
- shiba
- 시바견
- 30. Substring with Concatenation of All Words
- 컴퓨터의 구조
- 파이썬
- DWG
- Substring with Concatenation of All Words
- Python Code
- Regular Expression
- 315. Count of Smaller Numbers After Self
- attribute
- iterator
- 프로그래머스
- Convert Sorted List to Binary Search Tree
- Class
- 운영체제
- Generator
- t1
- data science
- 밴픽
- Decorator
- concurrency
- 715. Range Module
- Protocol
- Python Implementation
- kaggle
- LeetCode
- Python
- 43. Multiply Strings
Archives
- Today
- Total
목록Shuffle Algorithm (1)
Scribbling
This post is about Knuth Shuffle, a shuffle algorithm. - This algorithm allows random shuffle, giving all permuations of array equal likelihood. - No need for additional arrays, so memory complexity is O(1). - Time complexity is O(N) Code is pretty simple as below. To give all permuations of a particular array equal likelihood, all the number should have the same probability to be placed in a ce..
Computer Science/Algorithms & Data Structures
2022. 1. 15. 22:53