menu
Login
Register
search
Log In
account_circle
Log In
Email or Username
Password
Remember
Log In
Register
I forgot my password
Register
Username
Email
Password
Register
add
Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Prev
Blogs
New Blog
Exams
GO Book for GATECSE 2022
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Exact tag match
Recent Posts
Great resource for OS from an implementation point of view
The Geometric Probability Distribution
A great platform for gate preparation
IISc CDS M.Tech(Research) interview experience.2021(B.E in Printing Engineering)
IISc Bangalore CDS (M.Tech. Course Work) Written Test Questions 2021
Subjects
All categories
General Aptitude
(2.1k)
Engineering Mathematics
(8.5k)
Digital Logic
(3.1k)
Programming and DS
(5.1k)
Algorithms
(4.5k)
Theory of Computation
(6.3k)
Compiler Design
(2.2k)
Operating System
(4.7k)
Databases
(4.3k)
CO and Architecture
(3.5k)
Computer Networks
(4.3k)
Non GATE
(1.2k)
Others
(1.6k)
Admissions
(594)
Exam Queries
(838)
Tier 1 Placement Questions
(17)
Puzzles
(6)
Algorithm Challenges
(11)
Job Queries
(71)
Projects
(19)
Unknown Category
(1.2k)
Follow @gateoverflow
GATE Overflow
Recent questions and answers in Tier 1 Placement Questions
Recent Blog Comments
Invalid credentials for me. Will have to contact...
Yes. I have downloaded my admit card also..
Congratulations. Where did you join?
Can anyone login to https://ims.iiit.ac.in/?
Hello @Nikhil_dhama, Do you have solutions to...
Network Sites
GO Mechanical
GO Electrical
GO Electronics
GO Civil
CSE Doubts
Recent questions and answers in Tier 1 Placement Questions
6
votes
4
answers
1
Wine Bottle
A bad king has a cellar of 1000 bottles of delightful and very expensive wine. A neighboring queen plots to kill the bad king and sends a servant to poison the wine. Fortunately (or say unfortunately) the bad king's guards catch the servant after he has only poisoned one ... in mind of the king, how will he be able to do so ? (of course he has less then 1000 prisoners in his prisons)
A bad king has a cellar of 1000 bottles of delightful and very expensive wine. A neighboring queen plots to kill the bad king and sends a servant to poison the wine. Fortunately (or say unfortunately) the bad king's guards catch the servant after he has only poisoned one bottle. ... is in mind of the king, how will he be able to do so ? (of course he has less then 1000 prisoners in his prisons)
answered
Sep 7, 2020
in
Puzzles
jayeshasawa001
1.3k
views
puzzle
puzzles
placement-questions
1
vote
4
answers
2
Maximum length substring with k unique characters
Given an input string of length $n$, find the maximum length of the substring containing maximum $k$ unique characters. For example, for "abbcdaadcd" and $k=2$ answer will be 4 for the substring "daad".
Given an input string of length $n$, find the maximum length of the substring containing maximum $k$ unique characters. For example, for "abbcdaadcd" and $k=2$ answer will be 4 for the substring "daad".
answered
Feb 18, 2019
in
Algorithm Challenges
Debargha Bhattacharj
902
views
placement-questions
interview
0
votes
0
answers
3
InterView Bit
Given a non negative integer A, following code tries to find all pair of integers (a, b) such that a and b are positive integers a <= b, and a2 + b2 = A. 0 <= A <= 100000 However, the code has a small bug. Correct the bug and submit the ... b * b == A) { vector<int> newEntry; newEntry.push_back(a); newEntry.push_back(b); ans.push_back(newEntry); } } } return ans; }
Given a non negative integer A, following code tries to find all pair of integers (a, b) such that a and b are positive integers a <= b, and a2 + b2 = A. 0 <= A <= 100000 However, the code has a small bug. Correct the bug and submit the code. vector<vector<int> > ... a + b * b == A) { vector<int> newEntry; newEntry.push_back(a); newEntry.push_back(b); ans.push_back(newEntry); } } } return ans; }
asked
Oct 24, 2018
in
Puzzles
Shaina Singh
513
views
0
votes
1
answer
4
Coding String
Input You are given a template in which you need to implement a function whose signature is given below. C int findWordInAGrid(char grid[128][128], int m, int n, char word[32]) /* return 0 for false, 1 for true. */ C++ bool findWordInAGrid(char grid[128] ... abc abedhi efgh Output: The output of the above example should be: abc: true abedhi: true efgh: false Constraints 1 ≤ m,n ≤ 100
Input You are given a template in which you need to implement a function whose signature is given below. C int findWordInAGrid(char grid[128][128], int m, int n, char word[32]) /* return 0 for false, 1 for true. */ C++ bool findWordInAGrid(char grid[128][128], ... are: abc abedhi efgh Output: The output of the above example should be: abc: true abedhi: true efgh: false Constraints 1 ≤ m,n ≤ 100
answered
Sep 13, 2017
in
Puzzles
habedo007
264
views
algorithms
1
vote
1
answer
5
Finding best time complexity
$\begin{align*} & a[n] = \{x_1,x_2,x_3,x_4,....,x_n\} \text{ is an array of integers where } n,x_i > 0. \\ & A = \left [ \text{min}\left ( x_i,x_j \right ) \right ] \cdot \left ( j-i \right ) \text{ where } j > i \text{ and } i,j \leq n \\ & \text{What is the best time complexity to find out the value of } A_{\bf max} \; ? \end{align*}$
$\begin{align*} & a[n] = \{x_1,x_2,x_3,x_4,....,x_n\} \text{ is an array of integers where } n,x_i > 0. \\ & A = \left [ \text{min}\left ( x_i,x_j \right ) \right ] \cdot \left ( j-i \right ) \text{ where } j > i \text{ and } i,j \leq n \\ & \text{What is the best time complexity to find out the value of } A_{\bf max} \; ? \end{align*}$
answered
May 28, 2017
in
Algorithm Challenges
dd
415
views
algorithms
time-complexity
2
votes
2
answers
6
Maximum Continuous Sum in an Array
Given an array of $n$ elements find the maximum continuous sum in it. For example consider the below array of $n=6$. 23 4 -10 2 15 1 Answer is 35.
Given an array of $n$ elements find the maximum continuous sum in it. For example consider the below array of $n=6$. 23 4 -10 2 15 1 Answer is 35.
answered
Feb 14, 2017
in
Algorithm Challenges
amuchand47
1.2k
views
algorithm-challenge
placement-questions
dynamic-programming
3
votes
2
answers
7
Amazon Interview question on Linked list
Given a linked list : 1->2->3->4->5->6, make the following changes 1->6->2->5->3->4 What would be the most effiicient way to make this change?
Given a linked list : 1->2->3->4->5->6, make the following changes 1->6->2->5->3->4 What would be the most effiicient way to make this change?
answered
Oct 2, 2016
in
Algorithm Challenges
Ahwan
1.2k
views
linked-lists
algorithms
amazon-interview
0
votes
2
answers
8
Multiplication without '*'
Write a function (proper programming code) for multiplying two integers without using '*' operator and considering all corner cases.
Write a function (proper programming code) for multiplying two integers without using '*' operator and considering all corner cases.
answered
Jun 6, 2016
in
Algorithm Challenges
ManojK
512
views
placement-questions
1
vote
0
answers
9
Equivalence of Boolean Expressions
Write an object oriented code for representing boolean expressions and then a function for checking the equivalence of two boolean expressions.
Write an object oriented code for representing boolean expressions and then a function for checking the equivalence of two boolean expressions.
asked
Jun 6, 2016
in
Algorithm Challenges
Arjun
221
views
algorithm-challenge
placement-questions
0
votes
0
answers
10
Evaluate an arithmetic expression
Given an arithmetic expression involving *, + only write an object oriented code for its representation and evaluation
Given an arithmetic expression involving *, + only write an object oriented code for its representation and evaluation
asked
Jun 6, 2016
in
Algorithm Challenges
Arjun
478
views
algorithm-challenge
placement-questions
2
votes
1
answer
11
Zigzag Arrangement
Given an array with possible repeating elements you have to rearrange such that elements are alternatively decreasing and increasing (strict increase/decrease). For example, suppose the given array is 1 1 2 3 4 5 one possible answer would be 2 1 3 1 5 4. Assumption: Solution do exist for any given input. Hint: Try to avoid sorting.
Given an array with possible repeating elements you have to rearrange such that elements are alternatively decreasing and increasing (strict increase/decrease). For example, suppose the given array is 1 1 2 3 4 5 one possible answer would be 2 1 3 1 5 4. Assumption: Solution do exist for any given input. Hint: Try to avoid sorting.
answered
May 30, 2016
in
Algorithm Challenges
Arjun
791
views
arrays
combinatory
placement-questions
3
votes
1
answer
12
Permutation of String
How to generate permutation of a string? What will be the complexity?
How to generate permutation of a string? What will be the complexity?
answered
May 30, 2016
in
Algorithm Challenges
Arjun
416
views
combinatory
non-gate
1
vote
1
answer
13
interview\ C program\ What is output
main() { int arr2D[3][3]; printf("%d\n", ((arr2D==* arr2D)&&(* arr2D == arr2D[0])) ); }
main() { int arr2D[3][3]; printf("%d\n", ((arr2D==* arr2D)&&(* arr2D == arr2D[0])) ); }
answered
May 15, 2016
in
Puzzles
vijaycs
487
views
programming-in-c
output
pointers
0
votes
2
answers
14
the no of positive integral solutions of 15 x 1+x2+x3<=20 is equal to
answered
May 12, 2016
in
Puzzles
Shashank Kumar
3.6k
views
combinatory
12
votes
3
answers
15
IIITH-PGEE 2016
An anthropologist is visiting the island of knights and knaves one after the other.. This particular island is a very peculiar place, for it has only two kinds of inhabitants, namely, knights and knaves! Now, knights always tell the truth and knaves always lie! There are cluster of ... B: A is a knave, and this is the island of Maya. Is this the island of Maya? What are A and B ?
An anthropologist is visiting the island of knights and knaves one after the other.. This particular island is a very peculiar place, for it has only two kinds of inhabitants, namely, knights and knaves! Now, knights always tell the truth and knaves always lie! There are cluster of island on ... Maya. B: A is a knave, and this is the island of Maya. Is this the island of Maya? What are A and B ?
answered
Apr 30, 2016
in
Puzzles
srestha
1.1k
views
puzzles
puzzle
iiith-pgee
verbal-aptitude
2
votes
1
answer
16
Open the lock
You are given a number lock of 4 digits and it accepts a serial input. What should be the minimum length of an input string so that the lock is guaranteed to open assuming it opens if any of the consecutive 4 digits matches the code. Also how to get one such sequence?
You are given a number lock of 4 digits and it accepts a serial input. What should be the minimum length of an input string so that the lock is guaranteed to open assuming it opens if any of the consecutive 4 digits matches the code. Also how to get one such sequence?
answered
Apr 29, 2016
in
Algorithm Challenges
Shashank Kumar
565
views
algorithm-challenge
placement-questions
1
vote
1
answer
17
what is the best time complexity to find maximum product of exactly k elements in an array ?
According to me first we sort the array in O(nlogn) time and then in O(k) time , find the product , so total time complexity is O(nlogn) , so am I right or can it be done in lesser time ?
answered
Apr 10, 2016
in
Algorithm Challenges
Riya Roy(Arayana)
1.1k
views
algorithm-challenge
placement-questions
Help get things started by
asking a question
.
...