## Check if one string is a subsequence of another string.

Objective: Given two strings, write a program to check if any of the given string is a subsequence of another string. Example if given strings are A and B then EITHER A is subsequence...

Skip to content# Category: Beginner

## Check if one string is a subsequence of another string.

## Most frequent word

## Given an array, count the number of pairs with a given sum.

## Two Sum Problem

## Given an array, find the number of all pairs with odd sum.

## Sum of distinct elements among two given sets

## Insert a node in the given sorted linked list.

## Print sorted unique elements of a given array

## Find the sum of overlapping elements in two sets

## Given two coordinates, Print the line equation

## Print all middle elements of the given matrix/2D array.

## Depth-First Search (DFS) in 2D Matrix/2D-Array – Recursive Solution

## Hamming Distance between two given integers

## Breadth-First Search (BFS) in 2D Matrix/2D-Array

## Find all the Armstrong numbers in the given range

@tutorialhorizon

Objective: Given two strings, write a program to check if any of the given string is a subsequence of another string. Example if given strings are A and B then EITHER A is subsequence...

Objective: Given an array of string, write a program to find the word in the array which appears the maximum number of times. Example: Input: [Algorithms, String, Integer, Integer, Algorithms, String, Integer, Algorithms, String,...

Objective: Given an array of integers, write a program to count all the pairs with the given sum. Example: Given array: [1, 5, 7, 1, -1], Sum= 6 Total Pairs: 3 Note: pairs are...

Objective: Given an array of integers, and k. Write a program to find indexes of two elements in an array which sum is equal to K. Example: Given array: [5, 4, 7, 3, 9,...

Objective: Given an array of integers, write a program to find the number of pairs with even odd. Example: Given Input: [1, 2, 3, 4] Number of odd pairs: 4 Note: (1, 2), (1,...

Objective: Given two sets of elements, find the sum of all distinct elements from the set. In other words, find the sum of all elements which are present in either of the given set. ...

Objective: Given a linked list in which nodes are sorted in ascending order. Write an algorithm to insert a given node into the linked list so that all the nodes in the list will...

Objective: Given an array of integers with duplicates, write a program to print unique elements in the array in sorted order. Example: Given Input: [6, 1, 8, 5, 2, 10, 17, 25, 6, 5,...

Objective: Given two sets of integers, write an algorithm to print the sum of overlapping elements in two sets. Note: Elements in each set are unique or there are no duplicates within a set....

Objective: Given two coordinates (x1, y1) and (x2, y2). Write a java program to construct a line equation that passes through the given coordinates. Line Equation: Given two coordinates (x1, y1) and (x2, y2)...

Objective: Given a two-dimensional array, write a program to print all middle elements of the array. Or In other words, print all the elements from the array except boundary elements. Example: int [][] grid...

Objective: Given a two-dimensional array or matrix, Do the depth-First Search (DFS) to print the elements of the given matrix. Implement the Depth-first traversal in a recursive manner. Example: int [][] grid = new...

Objective: Given two integers, write an algorithm to calculate the hamming distance between the integers. Hamming Distance: Hamming distance between two integers is the number of positions at which the bits are different. Example:...

Objective: Given a two-dimensional array or matrix, Do the breadth-First Search (BFS) to print the elements of the given matrix. Implement a Breadth-first traversal in an iterative manner. Example: int [][] grid = new...

Objective: Given a range of integers, wrote a program to find all the Armstrong numbers in that range. What is Armstrong number: Determine the number of digits in the number. Call that n. Then...

%d bloggers like this: