Coding Challenge – Celebrity Problem.
Celebrity is the person to whom everyone know but he do not know any person. This problem one of the programing problem that asked in companies Problem Statement: You are…
Celebrity is the person to whom everyone know but he do not know any person. This problem one of the programing problem that asked in companies Problem Statement: You are…
We can generated all possible combination of alphabets or number using python with only few lines of code. We can use these combination to give unique identity to any one.…
The ternary operator is very useful for a single condition. But support ternary operator different way, not like other programming languages (?:). Syntax: A if C else B This first…
Problem statement: You have an array of number like [1,3,4,6,8] we need to find that these numbers are permutation of number or not, considering all numbers in an array. example:…
String formatting or Interpolation is an essential part of any programming language. In python string formatting can be done in different ways. It helps a programmer to create dynamic strings…
Here are my python interview/job preparation questions and answers. Which can help to to clear the interview or also help to take interview of any candidates. 1. What is list…
Stack implementation: class Stack: def pop(self): return self.items.pop() def __init__(self): self.items = [] def push(self, item): return self.items.append(item) def size(self): return len(self.items) def peek(self): return self.items[len(self.items)-1] def isEmpty(self): return len(self.items)…
In the previous blog, we have learned about python variable now we will learn the use of the operator on those variables. Whenever we write a logical statement we need…