Written Round: (1 hour) Given a linked list and K, print the last K nodes in reverse order.example: 1->2->3->4->5->6, K = 3 output: 6 5 4 Find out whether the given tree is BST or not. Rotate Given matrix by 90 clockwise. Technical Round: (1 hour) Given an array, for every element in the array, you need […]

## Method resolution order in Python Inheritance

Method Resolution Order :Method Resolution Order(MRO) it denotes the way a programming language resolves a method or attribute. Python supports classes inheriting from other classes. The class being inherited is called the Parent or Superclass, while the class that inherits is called the Child or Subclass. In python, method resolution order defines the order in […]

## host command in Linux with examples

host command in Linux system is used for DNS (Domain Name System) lookup operations. In simple words, this command is used to find the IP address of a particular domain name or if you want to find out the domain name of a particular IP address the host command becomes handy. You can also find […]

## Minimum removals in a number to be divisible by 10 power raised to K

Given two positive integers N and K. Find the minimum number of digits that can be removed from the number N such that after removals the number is divisible by 10K or print -1 if it is impossible. Examples: Input : N = 10904025, K = 2 Output : 3 Explanation : We can […]

## Ceiling in right side for every element in an array

Given an array of integers, find the closest greater element for every element. If there is no greater element then print -1 Examples: Input : arr[] = {10, 5, 11, 10, 20, 12}Output : 10 10 12 12 -1 -1 Input : arr[] = {50, 20, 200, 100, 30}Output : 100 30 -1 -1 -1 […]

## Python | Convert a list of multiple integers into a single integer

Given a list of integers, write a Python program to convert the given list into a single integer. Examples: Input : [1, 2, 3] Output : 123 Input : [55, 32, 890] Output : 5532890 There are multiple approaches possible to convert the given list into a single integer. Let’s see each one […]