This problem was asked by Facebook. Given a 32-bit integer, return the number with its bits reversed. For example, given the binary numberĀ 1111 0000 1111 0000 1111 0000 1111 0000, returnĀ 0000 1111 0000 1111 0000 1111 0000 1111 Solution Also see: Permutation of a string …

This problem was asked by Pinterest. Given an integer list where each number represents the number of hops, you can make, determine whether you can reach to the last index starting at index 0. For example, [2, 0, 1, 0] …

Here’s a new coding problem for today. This problem was asked by Google. Given a sorted list of integers, square the elements and give the output in sorted order. For example, given [-9, -2, 0, 2, 3], return [0, 4, …

This problem was asked by Google. Given a string, return the first recurring character in it, or null if there is no recurring character. For example, given the string “acbbac”, return “b”. Given the string “abcdef”, return null. Solution: To …

How web development looks like in 2020, let’s see? It seems like there is a new language or technology that comes out every day so it can be difficult to stay on top of your web development game it requires …

If you're familiar with programming, you might have known the list as an array. Yes, an array is known as a list in Python. A list is a collection of items in an order. You can make anything that you …

Problem: A natural number is said to be a Narcissistic Number if the sum of its digits each raised to the power of the total number of digits is equal to that number. eg. 153 = 1^3 + 5^3 + …

Before we explore functions deeper, I want you guys to be clear on Python’s different data types. Let’s get started without blah blah! Hey, stop. Read previous posts if you haven’t read yet! “Here“ Data types are not at all …

The power set of a set is the set of all its subsets. Write a function that, given a set, generates its power set. For example, given the set {1, 2, 3}, it should return {{}, {1}, {2}, {3}, {1, …

Think about how to reuse the lines of code in python? Sounds strange? That's where functions come into the picture, see the following code: