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