## Find an extra element in two almost similar arrays

Given two arrays where the second array has all the elements from the first array and one extra element.  Example:  … Read more

## Unresolved references error – Django in PyCharm and IntelliJ

This is a known problem for many. If you are seeing “Unresolved references error” for all the imports of Django … Read more

## Construct the Largest number from the given digits

Given a set of digits, write an algorithm to construct the largest number possible by appending the given digits. Example: … Read more

## Round Price Problem

Problem Statement: When customers book an Airbnb the total price, which includes base price + service fee + cleaning fee. … Read more

## K-Means Algorithm

The algorithm of kMeans is an unsupervised learning algorithm for clustering a set of items into groups. Given a set … Read more

## Longest contiguous character in a given String – O(N) Solution

Objective: Given an input string, write an algorithm to find the longest contiguous character or in other words, find a … Read more

## Product of all Unique elements in a given array.

Objective: Given an array of integers which contains duplicates as well. Write a program to find the product of all … Read more

## Multiply with power of 2 without using pow() or * operator

Objective: Given a number n and k, Calculate n * k2 without using pow() or *operator. Example: N = 3, … Read more

## Dynamic Programming – Maximum Subarray Problem

Objective:  The maximum subarray problem is the task of finding the contiguous subarray within a one-dimensional array of numbers that has the largest … Read more

## Level Order Traversal in Zig Zag pattern OR Print in Spiral Pattern

Objective: Given a binary Tree, Do Level Order Traversal in Zig Zag pattern OR Print in Spiral

Input: A Binary Tree

Output: Order Traversal in Zig Zag pattern OR Print in Spiral.

Better Solution :