Counting Triangles - InterviewBit Solution

You are given an array of N non-negative integers, A0, A1 ,…, AN-1.Considering each array element Ai as the edge length of some line segment

top of page

Search

Counting Triangles - InterviewBit Solution

You are given an array of N non-negative integers, A0, A1 ,…, AN-1.Considering each array element Ai as the edge length of some line segment

3 Sum Zero - InterviewBit Solution

Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0?
Find all unique triplets in the array which gives

3 Sum - InterviewBit Solution

Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target.

Pair With Given Difference - InterviewBit Solution

Given a one-dimensional unsorted array A containing N integers.
You are also given an integer B, find if there exists a pair of elements in

Minimum Parantheses! - InterviewBit Solution

Given a string A of parantheses ‘(‘ or ‘)’.
The task is to find minimum number of parentheses ‘(‘ or ‘)’ (at any positions) we must add to

Pretty Json - InterviewBit Solution

Given a string A representing JSON object. Return an array of the string denoting JSON object with proper indentation.

Minimum Appends for Palindrome! - InterviewBit Solution

Given a string A consisting of lowercase characters.
We need to tell minimum characters to be appended (insertion at end) to make the strin

Remove Consecutive Characters - InterviewBit Solution

Given a string A and integer B, remove all consecutive same characters that have length exactly B.

Vowel and Consonant Substrings! - InterviewBit Solution

Given a string A consisting of lowercase characters.
You have to find the number of substrings in A which starts with vowel and end with co

Single Number II - InterviewBit Solution

Given an array of integers, every element appears thrice except for one which occurs once.
Find that element which does not appear thrice.

bottom of page