Hello, checkiomates🐱👤!
Gently reminder: Prices Go Up September 1 — Lock In Your Rate Now!
We start by exploring the developer's mindset through an article on personal growth, then transition to practical coding with a guide on mastering text similarity and fuzzy matching. The journey continues by revealing the surprising power hidden within Python's built-in collections module. To hone your foundational computer science skills, we present a mission to implement a binary search algorithm, a perfect exercise in understanding the efficiency of the divide and conquer strategy.
💡TIP
At every mission page, under the editor window, there is a terminal window. If you want to discover all CheckiO features, visit our tutorial. It's a longread, but it's worth it!
🏁 MISSION
Binary Search - Divide and Conquer by freeman_lex -
Binary search is an effective method that employs the divide and conquer strategy to quickly find an element in an ordered list, significantly reducing the search space by half at each step. The goal of this exercise is to implement binary search in such a way that it returns the index of the searched element in the list (or -1 if it is not present) and the number of steps performed, providing a clear view of the divide and conquer process in action. In the image below, you can find an illustration of the algorithm at work.
bin_search([1, 2, 3, 4, 5], 3) == [2, 1] bin_search([], 2) == [-1, 1] bin_search([1, 10, 100, 1000], 1000) == [3, 3]
📖 ARTICLES
You might not need a Python class -
Coming from other languages, you might think a class is the easiest way to do something, but Python has other choices. This post shows you some alternatives and why you might choose them.
4 Text Similarity Tools: When Regex Isn’t Enough -
Text similarity is a fundamental challenge in data science. For data that contains duplicates, clustering content, or building search systems, this article explores using 4 different tools to solve this Regex, difflib, RapidFuzz, and Sentence Transformers
10 Surprising Things You Can Do with Python’s collections Module -
This tutorial explores ten practical applications of the Python collections module, including use of Counter, namedtuple, defaultdict, and much more.
👩💻CODE SHOT
What do you think the following code does?
from datetime import datetime
def checkio(time: string):
start=datetime.strptime("06:00","%H:%M")
end=datetime.strptime("18:00","%H:%M")
time=datetime.strptime(time,"%H:%M")
diff=(time-start).seconds/60*0.25
return diff if start<=time<=end else "I don't see the sun!"
🙌 Thanks for your attention! Hope to meet you at CheckiO, as well as at our Instagram and Twitter! We are really interested in your thoughts! Please, leave a comment below! ⤵
