Skip to content
All Hard Articles
Let f (x) be a polynomial and g(x) = f (x) be its derivative. If the degree of (f(x) + f(−x)) is 10, then the… Read More
In a 2 × 4 rectangle grid shown below, each cell is a rectangle. How many rectangles can be observed in the grid? (A) 21… Read More
Let Q denote a queue containing sixteen numbers and S be an empty stack. Head(Q) returns the element at the head of the queue Q… Read More
Let G be a complete undirected graph on 4 vertices, having 6 edges with weights being 1, 2, 3, 4, 5, and 6. The maximum… Read More
ROUND 1 (Telephonic, 70 mins): 1. Given an array, print the greatest element on right side, for elements having no greater element print “-1”.. 2. Given… Read More
Given an array arr[] of n numbers and a number K, find the number of subsets of arr[] having XOR of elements as KExamples : … Read More
Given a pattern containing only I’s and D’s. I for increasing and D for decreasing. Devise an algorithm to print the minimum number following that… Read More
Telephonic round: (1 hour) It is started with interviewer introduction followed by my introduction. Need to write the code in shared docs. They shared CollabEdit… Read More
What is the output of the following program : import re sentence = 'horses are fast' regex = re.compile('(?P<animal>\w+) (?P<verb>\w+) (?P<adjective>\w+)') matched = re.search(regex, sentence)… Read More
What will be the output of the following code : print type(type(int)) (A) type ‘int’ (B) type ‘type’ (C) Error (D) 0 Answer: (B) Explanation:… Read More
Given an set of positive integers. find the maximum XOR subset value in the given set. Expected time complexity O(n).Examples: Input: set[] = {2, 4,… Read More
We strongly recommend to refer below post as a prerequisite of this.Heavy Light Decomposition | Set 1 (Introduction)In the above post, we discussed the Heavy-light… Read More
There were 6 rounds in total after which I was shortlisted for the position. General questions like ‘why Expedia?, describe yourself & your experience? reason… Read More
Given a limit, print all primes smaller than or equal to the given limit. Examples : Input: limit = 10 Output: 2, 3, 5, 7… Read More
1. Topological sort. 2. Reverse linked list in pairs. (1->2->3->4 to 2->1->4->3) 3. Print a binary tree in spiral order 4. Reverse an array without… Read More
Let there be n agents and n tasks. Any agent can be assigned to perform any task, incurring some cost that may vary depending on… Read More
Predict the output of the following program. class Test {     public static void main(String[] args)     {         Double object = new Double("2.4");         int a = object.intValue();… Read More
Predict the output of the following program. class Test {     int a = 1;     int b = 2;        Test func(Test obj)     {         Test obj3… Read More
Predict the output of the following program. class Test {     boolean[] array = new boolean[3];     int count = 0;        void set(boolean[] arr, int x)… Read More
Introduction Random numbers in computer science is used for cryptography, simulation, sampling, design and games. In the past the need for more and more randomness… Read More