Few days ago, I came across a question on quora which goes like this:
How do you solve this programming problem? Imagine you want to find all permutations of 2, 3, and 7 that can add up to make 10. (Ex: 2, 2, 2, 2, 2; or 3 , 7).
The question is basically asking us to represent sum using numbers from...
Leetcode 78: Subsets
In this post, I'm going to talk about a problem on leetcode which asks us to find all the possible subsets of given list of integers.
This problem is the base to solving other problems like subset sum and subset partitioning which I'll be discussing in coming posts.
Let's get started:
I'll be solving...
What are *args and **kwargs in Python
In this post, I'm going to talk about *args and **kwargs in Python which is a useful concept while handling multiple arguments.
They are called *args and **kwargs in Python which allows the function to accept optional arguments(positional and keyword).
Let’s see with an example.
At first, let’s make a simple function that accepts a single argument, first_name.
>>> def person(first_name):
......