| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 | 29 | 30 |
Tags
- Python
- shiba
- 컴퓨터의 구조
- 프로그래머스
- concurrency
- Convert Sorted List to Binary Search Tree
- 운영체제
- 30. Substring with Concatenation of All Words
- Generator
- 109. Convert Sorted List to Binary Search Tree
- t1
- 315. Count of Smaller Numbers After Self
- DWG
- 43. Multiply Strings
- attribute
- 시바견
- Python Code
- Regular Expression
- Substring with Concatenation of All Words
- Decorator
- Class
- LeetCode
- 715. Range Module
- iterator
- Protocol
- 파이썬
- 밴픽
- Python Implementation
- kaggle
- data science
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