All Hard Articles
The below implementation is to generate random number from 1 to given limit. The below function produces behavior similar to srand() function. Prerequisite : random… Read More
Given a string A, compute the minimum number of characters you need to delete to make resulting string a palindrome. Examples:  Input : baca Output… Read More
Write a program to implement Simpson’s 3/8 rule.The Simpson’s 3/8 rule was developed by Thomas Simpson. This method is used for performing numerical integrations. This… Read More
Given a string containing only digits, restore it by returning all possible valid IP address combinations.A valid IP address must be in the form of… Read More
XNOR gives the reverse of XOR if binary bit.   First bit | Second bit | XNOR 0 0 1 0 1 0 1 0 0… Read More
Given the upper limit, print factorials of all Fibonacci Numbers smaller than the limit.Examples :   Input : limit = 20 Output : 1 1 1… Read More
A Twin prime are those numbers which are prime and having a difference of two ( 2 ) between the two prime numbers. In other… Read More
numpy.sin(x[, out]) = ufunc ‘sin’) : This mathematical function helps user to calculate trigonometric sine for all x(being the array elements). Parameters :   array : [array_like]elements… Read More
Samsung Semiconductor India R&D, Bangalore had visited our campus for placements. Only ECE students were allowed. There was an online coding round conducted, followed by… Read More
Given two strings A and B, the problem is to find if string B will be a subsequence of string A if we remove the… Read More
The C library function strcspn() calculates the length of the number of characters before the 1st occurrence of character present in both the string. Syntax… Read More
We are given an array, find prefix sums of given array. Examples: Input : arr = [1, 2, 3] Output : sum = [1, 3,… Read More
Given two integers, n and k. Initially we have a sequence consisting of a single number 1. We need to consider series formed after n… Read More
The trinomial triangle is a variation of Pascal’s triangle. The difference between the two is that an entry in the trinomial triangle is the sum… Read More
Prerequisite : JSON Formatting in Python Google has an excellent web service that allows us to make use of their large database of geographic information.… Read More
Given n, how many distinct Max Heap can be made from n distinct integers? Examples:  Input : n = 3 Output : Assume the integers… Read More
Round 0: I was given two problems to solve on paper (I wrote this as zero because it was not elimination round) Given a linked… Read More
Round 1 (2.5 hours) : First round was an aptitude test on AMCAT, consisting of verbal, quantative, logical reasoning and MCQs on data structures and… Read More
Given a positive integer \’n\'( 1 = 1;      }       // n must be odd at this point,     // thus skip the even numbers      // and… Read More
Round 1: Distance between two given nodes in a binary tree. I was asked to write the optimal approach for the this. A group of people… Read More