Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Filter
Recent
Hot!
Most votes
Most answers
Most views
Previous GATE
Featured
Hot questions in Tier 1 Placement Questions
0
votes
0
answers
1
Make Equal Subarray Problem Statement You are given two arrays (A and B) each of size N. You want to change A to B.
rk231219
asked
in
Algorithm Challenges
Jan 5, 2022
by
rk231219
1.3k
views
6
votes
4
answers
2
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)
pC
asked
in
Puzzles
Apr 9, 2016
by
pC
3.2k
views
puzzle
puzzles
placement-questions
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; }
Shaina Singh
asked
in
Puzzles
Oct 24, 2018
by
Shaina Singh
1.1k
views
1
vote
4
answers
4
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".
Arjun
asked
in
Algorithm Challenges
Jun 6, 2016
by
Arjun
1.5k
views
placement-questions
interview
0
votes
1
answer
5
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
Priyanka Sen
asked
in
Puzzles
Sep 6, 2017
by
Priyanka Sen
407
views
algorithms
1
vote
1
answer
6
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*}$
dd
asked
in
Algorithm Challenges
May 27, 2017
by
dd
709
views
algorithms
time-complexity
2
votes
2
answers
7
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.
Arjun
asked
in
Algorithm Challenges
Jul 3, 2016
by
Arjun
2.2k
views
algorithm-challenge
placement-questions
dynamic-programming
3
votes
2
answers
8
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?
sh!va
asked
in
Algorithm Challenges
Jul 22, 2016
by
sh!va
2.0k
views
linked-list
algorithms
amazon-interview
13
votes
3
answers
9
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 ?
pC
asked
in
Puzzles
Apr 20, 2016
by
pC
1.5k
views
puzzles
puzzle
iiith-pgee
verbal-aptitude
1
vote
1
answer
10
interview\ C program\ What is output
main() { int arr2D[3][3]; printf("%d\n", ((arr2D==* arr2D)&&(* arr2D == arr2D[0])) ); }
Desert_Warrior
asked
in
Puzzles
May 15, 2016
by
Desert_Warrior
2.0k
views
programming-in-c
output
pointers
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.
Arjun
asked
in
Algorithm Challenges
May 27, 2016
by
Arjun
1.1k
views
array
combinatory
placement-questions
1
vote
1
answer
12
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 ?
radha gogia
asked
in
Algorithm Challenges
Apr 10, 2016
by
radha gogia
1.6k
views
algorithm-challenge
placement-questions
0
votes
2
answers
13
Multiplication without '*'
Write a function (proper programming code) for multiplying two integers without using '*' operator and considering all corner cases.
Arjun
asked
in
Algorithm Challenges
Jun 6, 2016
by
Arjun
793
views
placement-questions
3
votes
1
answer
14
Permutation of String
How to generate permutation of a string? What will be the complexity?
Arjun
asked
in
Algorithm Challenges
May 30, 2016
by
Arjun
679
views
combinatory
non-gate
0
votes
0
answers
15
Evaluate an arithmetic expression
Given an arithmetic expression involving *, + only write an object oriented code for its representation and evaluation
Arjun
asked
in
Algorithm Challenges
Jun 6, 2016
by
Arjun
741
views
algorithm-challenge
placement-questions
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?
Arjun
asked
in
Algorithm Challenges
Apr 10, 2016
by
Arjun
877
views
algorithm-challenge
placement-questions
1
vote
0
answers
17
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.
Arjun
asked
in
Algorithm Challenges
Jun 6, 2016
by
Arjun
343
views
algorithm-challenge
placement-questions
To see more, click for the
full list of questions
or
popular tags
.
Subscribe to GATE CSE 2023 Test Series
Subscribe to GO Classes for GATE CSE 2023
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
Recent Posts
From GATE to Australia
DRDO Previous Year Papers
From Rank 4200 to 64: My Journey to Success in GATE CSE Exam
What are the key things to focus on during the final 10-15 days before the GATE exam to improve performance?
All India GO Classes Mock test
Subjects
All categories
General Aptitude
(2.5k)
Engineering Mathematics
(9.3k)
Digital Logic
(3.3k)
Programming and DS
(5.9k)
Algorithms
(4.6k)
Theory of Computation
(6.7k)
Compiler Design
(2.3k)
Operating System
(5.0k)
Databases
(4.6k)
CO and Architecture
(3.8k)
Computer Networks
(4.6k)
Non GATE
(1.3k)
Others
(2.4k)
Admissions
(649)
Exam Queries
(842)
Tier 1 Placement Questions
(17)
Puzzles
(5)
Algorithm Challenges
(12)
Job Queries
(74)
Projects
(9)
Unknown Category
(853)
Recent Blog Comments
This guy was just exceptional. I remember hearing...
Inspirational! Found the right Blog at the right...
That was my second attempt. I already had notes,...
Sorry to break the news, but: I see a few flaws...
bhai mujhe bhi bula lo australia......mai bhi...
Network Sites
GO Mechanical
GO Electrical
GO Electronics
GO Civil
CSE Doubts
Aptitude Overflow