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

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...

Skip to content# Category: Test Enginner

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

## Two Sum Problem

## Given an array, find three-element sum closest to Zero

## Find the sum of overlapping elements in two sets

## Check if the given binary tree is Full or not.

## Print Stack in reverse order.

## Evaluation of Prefix Expressions (Polish Notation) | Set 1

## Find the maximum number present in a String

## Convert Prefix to Postfix Expression

## Convert Roman Number to Integer

## Convert Postfix to Prefix Expression

## Convert Postfix to Infix Expression

## String to Integer (AtoI – ASCII to Integer)

## Longest substring with at most two unique characters

## Convert Prefix to Infix Expression

@tutorialhorizon

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, find the sum of any three elements which is closest to zero. The array may contain positive and negative elements. Example: Given Input: [-1, 4, -2, 5, 10,...

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 a binary tree, write an algorithm to check if the tree is Full or not. Full binary tree: A binary tree T is full if each node is either a leaf or...

Objective: Given a stack, write a program to print the stack elements in reverse order. Example: Approach: Use Temporary stack: Take temporary stack, and copy all the items from the given stack to a...

Prefix notation is a notation for writing arithmetic expressions in which the operands appear after their operators. There are no precedence rules to learn. Let’s assume the below Operands are real numbers in real...

Given a string with alphabets and numbers. Write an algorithm to find the maximum number in the string. If any number is greater than equal to Max_Value of integer then return the Max_Value. Example:...

Objective: Given a Prefix expression, write an algorithm to convert it into Postfix expression. Example: Input: Prefix expression: + A B Output: Postfix expression: A B + Input: Prefix expression: *-A/BC-/AKL Output: Postfix expression:...

Objective: Given a Roman number, write a program to convert it to Integer. Roman Number – Letters used in Roman numerals and the corresponding numerical values are given in the table below. Rules: ...

Objective: Given a Postfix expression, write an algorithm to convert it into prefix expression. Example: Input: Postfix expression: A B + Output: Prefix expression- + A B Input: Postfix expression: ABC/-AK/L-* Output: Infix expression:...

Objective: Given a Postfix expression, write an algorithm to convert it into Infix expression. Example: Input: Postfix expression: A B + Output: Infix expression- (A + B) Input: Postfix expression: ABC/-AK/L-* Output: Infix expression:...

Objective: Implement atoi, which converts string to an integer. Rules for converting string to an integer. If the string is null or empty, Integer will be 0. The first character of string may represent...

Objective: Given a string, write an algorithm to find the longest substring with at most two characters. Example: Input: aabbccddc Output: ccddc, length: 5 Input: aabacbeeeebeaabb Output: beeeebe, length 7 Input: aaaaaa Output: Only...

Objective: Given a Prefix expression, write an algorithm to convert it into Infix expression. Example: Input: Prefix expression: + A B Output: Infix expression- (A + B) Input: Prefix expression: *-A/BC-/AKL Output: Infix expression:...

%d bloggers like this: