Home
k0nze
Cancel

# Two Sum Problem Solution in C++ in O(n)

The “Two Sum Problem” is described as follows: Given an array of integers nums and an integer target, return the indices of the two integers in nums such that they add up to target. See Leetcode “...

# Python @staticmethod vs @classmethod

Python Functions are First-class Objects In Python functions are first-class objects which means that functions can be assigned to variables or passed as an argument for another function in the ...

# What is Python __name__ == '__main__'?

You might have seen the Python line if __name__ == "__main__": in several code examples and wonder what does it do? Many other programming languages such as Java or C/C++ require a main function ...

# Big O Notation Explained

Why is Big O Notation Used? When you got different algorithms to solve the same problem, you need to compare those to each other to pick the best (meaning fastest) for your program. Looking at eac...

# Python Course #18: Your First Sorting Algorithm (Insertion Sort Explained)

With the knowledge of Python functions and algorithms, we are ready to write our first sorting algorithm and also take a closer look at how fast it runs. What is a Sorting Algorithm A sorting a...

# Python Course #17: What is an Algorithm

You probably hear the term algorithm a couple of times a week. YouTubers especially like to praise or blame “the algorithm” for their success or failure. In this article, I want to go a little more...

# Python Course #16: Functions

Up until now you have used a lot of functions already, most prominently the print(...) function. Now it is time to write your own functions in Python. What is a function in Programming? A fun...

# Python Course #15: Reading and Writing Files

So far, you can store data within the variables of a program; however, when the program ends, this data is gone. And when you start the program again, all the data you want to work with has to be e...

# What is an NFT? A Computer Scientist's Perspective

NFTs have been all the rage for some time now. Twitter just introduced an NFT profile pictures where you can set your Twitter profile picture to an image that is “linked” to an NFT you own. But wha...

# Python Course #14: User Input

Now that you know how to use for and while loops in Python, you can start getting input from outside of your program. In this article, you will learn how to capture a user’s input and build a small...