# Tag - n number

## C Programming – check for pair in A[] with sum as x

Time Complexity: Depends on what sorting algorithm we use. If we use Merge Sort or Heap Sort then (-)(nlogn) in worst case.

## C++ Programming – Construct an array from its pair-sum array

C++ Programming - Construct an array from its pair-sum array - Algorithm - A pair-sum array for an array is array that contains sum of all pairs in ordered

## Java Programming – Construct an array from its pair-sum array

Java Programming - Construct array from its pair-sum array - Algorithm - A pair-sum array for array is array that contains sum of all pairs in ordered form.

## C++ Programming – Print first k digits of 1/n where n is a positive integer

C++ Programming- Print first k digits of 1/n where n is a positive integer- Mathematical Algorithms - Given a positive integer n, print first k digits

## C++ Programming – Count Distinct Non-Negative Integer Pairs (x, y)

C++ Programming - Count Distinct Non-Negative Integer Pairs (x, y) - Mathematical Algorithms - A Simple Solution is to run two loops. The outer loop

## C++ Programming – Count number of binary strings without consecutive 1’s

C++ Programming - Count number of binary strings without consecutive 1’s - Mathematical Algorithms - Let a[i] be the number of binary strings of length

## Longest Even Length Substring such that Sum of First and Second Half is same

Longest Even Length Substring such that Sum of First and Second Half is same - Searching and Sorting - Given a string ‘str’ of digits, find length of the...

## C program to add n numbers

C program to add n numbers - C Programming - This c program add n numbers which will be entered by the user. Firstly user will enter a number indicating