# Find the sum of the largest increasing branch in an n-ary tree

Finding the sum of the largest increasing branch in an n-ary tree can be a difficult task. This article provides an example C++ program that can help you find the sum of the largest increasing branch in an n-ary tree. An n-ary tree is a tree in which every node has at most n children.Read More »

# The fizzbuzz program in python

The FizzBuzz program is a great way to test your Python skills in regards to conditions and loops. The task is to loop through the numbers between 1 and 100, and for each number, check if it is divisible by 3. If it is, print “fizz.” If it is divisible by 5, print “buzz.” IfRead More »

# Python program to add two numbers

The addition operator (+) is widely used in programming languages, including Python, to add two or more values together. In its simplest form, Python allows for easy addition of numbers by directly entering the values into the command line. For example, you can add two numbers by simply typing them in the Python command lineRead More »

# Program to find factorial of a number in python

“Discover the Different Ways to Find the Factorial of a Number in Python” In mathematics, the factorial of a number is the product of all the integers from 1 to that number. The factorial of a number is represented by an exclamation mark (!) following the number. For example, the factorial of 4 is writtenRead More »

# Armstrong number in python

An Armstrong number, also known as a narcissistic number, is a special type of number that possesses a unique mathematical property. The property states that the number is equal to the sum of each of its digits raised to the power of the number of digits in the number. For example, an Armstrong number ofRead More »

# Prime number program in python

A prime number is a number that is only divisible by 1 and itself. With the power of Python programming, we can easily determine if any given number is a prime number or not. Furthermore, we can also find all prime numbers within a given range of numbers, such as from 2 to N. InRead More »

# Write a program to print the Fibonacci series in python.

The Fibonacci sequence is a well-known pattern of numbers that has been used in mathematics since antiquity. This series is characterised by each number being the sum of the two numbers prior, which always begin with 0 and 1. To generate a Fibonacci series of any length, simply add the two numbers preceding it togetherRead More »

# Python hello world program

Python is a scripting language that runs using a python interpreter. The interpreter converts the program (python text file with “.py” extension) into hardware understandable format. Let us see a simple hello world program using python language. While we install the python program, it gives a set of executables in which one executable is “python”Read More »

# Print missing and duplicate numbers in the given sequence of numbers.

Given a range of natural numbers where some numbers are repeated and some are missing in the range. Our aim is to find missing numbers and repeated numbers. Let us discuss the problem with an example. So for the input {2, 3, 3, 5, 5, 8, 2} our output should be as follows. This problemRead More »

# Auto-suggestion implementation using Trie Data Structure.

Trie data structure has many useful applications, one of the important applications of the trie is auto-suggestion when user inputs using the keyboard. Let us assume we have a dictionary that contains “APPLE”, “APE”, “GOD”, “GOOD”, “GUN”. So, when a user enters “GO” then our auto-suggestion suggests “GOD”, “GOOD” as a suggested list of words.Read More »

# Trie Data Structure

Trie data structures are useful to process and search in large character data sets. It takes only orders of word length to search a word in length file or a million words dictionary. Some examples where Trie’s use. In finding words in large files. In finding any word in the large dictionary of words. InRead More »

# Sort squares of a sorted array in linear runtime (O(n))

Given a sorted array that contains both negative and positive integers we aim to get its squares array in sorted orders. Let us understand this with an example. Let’s understand how we can solve this problem in linear time. To solve this in linear time, we have to take two handles which represent the startRead More »

# Find the longest substring with given max unique characters.

Given a string and an integer representing max unique characters, we aim to find the longest substring that does not exceed max unique characters. Let us understand this with an example. We can solve this problem by iterating over each character set in the array and gets the difference in character change. Let’s see thisRead More »

# Find the nearest integer of a given number in the binary search tree.

Given a Binary Search Tree (BST) contains integers and an integer. We aim to find the nearest node to input integer in the BST. Let us understand this with an example. Let’s see how our solution works to get the nearest node to the target integer. This algorithm runs with O(H), where is ‘H’ isRead More »

# Clone given Graph

Given a graph with an adjacency list, we aim to clone the complete graph with edges. Cloning does creates a new memory for similar data. Let us understand this with a three-node example graph. We can solve this problem using either DFS or BFS. Let’s solve this problem using DFS. Our Graph object contains theRead More »