Month: May 2021

[FANG KILLER ICP] Will the Internet Computer Disrupt Big Tech?

What is the Internet Computer? The Internet Computer is blockchain technology and computing infrastructure initiated by the non-profit organization DFinity. Like the public Internet, the Internet Computer is a distributed computing platform consisting of thousands of connected and decentralized servers that host backend software. This idea mitigates the increasing monopolization of Internet services and enables …

[FANG KILLER ICP] Will the Internet Computer Disrupt Big Tech? Read More »

How to Check Whether a Variable is a Class or Not?

This tutorial explores the ways one can check if a variable is a class. The direct way to check if a variable is a class, is to use the isclass() runtime service, from Python’s inspect module.  Use isclass() in conjunction with Python’s isinstance() built-in function, to examine a variable. Both of these return a Boolean …

How to Check Whether a Variable is a Class or Not? Read More »

[Google Interview] Find the k-th Largest Element in an Unsorted Array

Do you train for your upcoming coding interview? This question was asked by Google as reported in multiple occasions by programmers all around the world. Can you solve it optimally? Let’s dive into the problem first. Problem Formulation Given an integer array or Python list nums and an integer value k. Find and return the …

[Google Interview] Find the k-th Largest Element in an Unsorted Array Read More »

How to Print a Percentage Value in Python?

To print a percentage value in Python, use the str.format() method or an f-string on the format language pattern “{:.0%}”. For example, the f-string f”{your_number:.0%}” will convert variable your_number to a percentage string with 0 digits precision. Simply run those three basic statements in your shell: your_number = 0.42 percentage = “{:.0%}”.format(your_number) print(percentage) As a …

How to Print a Percentage Value in Python? Read More »