Given a number n, find the nth Pentatope number. A pentatope number is represented by the fifth number in any row of Pascal’s Triangle. As… Read More »

#
All Basic Articles

Given an array A[] of n elements and an integer k. The task is to find the number of triplet (x, y, k), where 0… Read More »

Debouncing in JavaScript is a practice used to improve browser performance. There might be some functionality in a web page which requires time-consuming computations. If… Read More »

Given a string s, print reverse of string and remove the characters from the reversed string where there are vowels in the original string. Examples:… Read More »

Given coordinates of two pivot points (x0, y0) & (x1, y1) in coordinates plane. Along with each pivot, two different magnets are tied with the… Read More »

Given a positive integer n. The task is to find the sum of the sum of first n natural number. Examples: Input : n =… Read More »

There is a school on the foothills of Himalayas. This Gurukul admits only 100 students every year and these are entitled to be the best… Read More »

Given different scored marks of students. We need to find grades. The test score is an average of the respective marks scored in assignments, tests… Read More »

Lex is a computer program that generates lexical analyzers and was written by Mike Lesk and Eric Schmidt. Lex reads an input stream specifying the… Read More »

Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and… Read More »

Given n elements, write a program that prints the longest increasing subsequence whose adjacent element difference is one. Examples: Input : a[] = {3, 10,… Read More »

Ruby is an Object-Oriented language developed by Yukihiro Matsumoto in mid 1990’s in Japan. The Objective of its development was to make it act as… Read More »

Given two arrays of same size, we need to convert the first array into another with minimum operations. In an operation, we can either increment… Read More »

Find the output of the following Java code line System.out.println(math.floor(-7.4)) (A) -7 (B) -8 (C) -7.4 (D) -7.0 Answer: (B) Explanation: In Java, floor function… Read More »

Given an array of even number of elements, form groups of 2 using these array elements such that the difference between the group with highest… Read More »

Prerequisite – Classification of Routing Algorithms Distance Vector Routing – It is a dynamic routing algorithm in which each router computes distance between itself and… Read More »

Prerequisite :Array in C/C++, More on array A four-dimensional (4D) array is an array of array of arrays of arrays or in other wordes 4D… Read More »

Given a matrix, the task is to find the maximum element of each row. Examples : Input : [1, 2, 3] [1, 4, 9] [76,… Read More »

Given an array and limits (lower and upper limits), check the sum of the subarray in the given limit is prime or not Examples :… Read More »

Given the value of length, print the X pattern in a box using # and ” ” Examples: Input : 10 Output : ########## ##… Read More »