From a7a039a704360f102ac8c678533c5cf113a499a1 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Tue, 19 Apr 2022 14:27:32 +0300 Subject: feat: use more of the wiki-style --- blog/2021-08-18.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'blog/2021-08-18.md') diff --git a/blog/2021-08-18.md b/blog/2021-08-18.md index 6655824..f048106 100644 --- a/blog/2021-08-18.md +++ b/blog/2021-08-18.md @@ -68,7 +68,7 @@ Which will produce a nice output in less then **0.03** seconds: Notice that the only list stored in memory was the original one. Each combination only appeared in memory when it was needed to calculate the sum, and immediately disappeared after that. That's why it's (relatively) fast! -## Takeaway +# Takeaway Of course this script isn't by any means optimal! Essentially it's a brute force, we are just checking all the possible combinations. But we are doing it in a **clean and efficient way** (credit to generators). When you are solving real-life problems, you are not in algorithms class and you don't have to write a hardcore algo, you just have to correctly utilize amazing toolkit that this language has. I've spend no more than 5 minutes writing this and I already have the answer to my problem - that's the beauty of Python :python:! -- cgit v1.2.3