All Medium Articles
First Round: Written, pen paper based. The candidate has to write the output for C programs and basic aptitude questions. Total 30 questions. Test duration… Read More
Coding round (1 hour): 1. Spirally traversing a matrix 2. Add two numbers represented by linked lists   Face to Face Round 1 (Technical ~ 1 hour)… Read More
Given a matrix of size M x N, there are large number of queries to find submatrix sums. Inputs to queries are left top and… Read More
Given the following inputs,  An ordinary differential equation that defines value of dy/dx in the form x and y.Initial value of y, i.e., y(0) Thus… Read More
I was interviewed for Software Development Engineering (SDE1) role Flipkart. Round 1: Machine Coding round: (90 minutes) Given a binary tree as a sequence of… Read More
Leaf traversal is the sequence of leaves traversed from left to right. The problem is to check if the leaf traversals of two given Binary… Read More
Round-1 (World Trade Centre, Bangalore) – Technical 1. Given an array that is first increasing then decreasing, find an element in it. Example: arr[] =… Read More
In order to understand how to swap objects in Java, let us consider an illustration below as follows: Illustration:  Let’s say we have a class… Read More
Cognizant campus placement was consisting of the following rounds: Written Technical interview HR Interview Written Round: It was consisting of Quantitative aptitude, Logical reasoning, and… Read More
What is the output of the following program :  Python3 print \'cd\'.partition(\'cd\') (A) (‘cd’) (B) (”) (C) (‘cd’, ”, ”) (D) (”, ‘cd’, ”) Answer:… Read More
What is the output of the following program :  Python3 def myfunc(a):    a = a + 2        a = a * 2    return a print myfunc(2) (A) 8 (B)… Read More
What is the output of the following program :  Python3 print 0.1 + 0.2 == 0.3 (A) True (B) False (C) Machine dependent (D) Error… 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) print(matched.groupdict())… Read More
What is the output of the following code : L = ['a','b','c','d'] print("".join(L)) (A) Error (B) None (C) abcd (D) [‘a’,’b’,’c’,’d’] Answer: (C) Explanation: “”… Read More
Round 1 Test Duration 90 Minutes No. of Questions 22 questions Test Sections Section 1: Data Structures, Hash maps, Tree Traversals, Basic pointer questions and… Read More
I had an interview recently with Goldman Sachs Bangalore for 2+ years Java Developer position. I got a call from some consultancy and after my… Read More
Given a Binary Tree and a node x in it, find distance of the closest leaf to x in Binary Tree. If given node itself… Read More
I recently had interviews with Amazon. Here’s my interview experience Coding round on Hacker rank (1 hour): 1. Find minimum number of coins that make… Read More
Consider below program in C. // Please make sure that you compile this program // using a C compiler, not a C++ compiler (Save your… Read More
Given three non-collinear integral points in XY plane, find the number of integral points inside the triangle formed by the three points. (A point in… Read More