search
Log In

Recent questions and answers in Tier 1 Placement Questions

0 votes
1 answer
1
Can anybody please tell me, what is the age limit for ACM ICPC? By next year, I'll be 24, so will I be eligible for the same?
answered 16 hours ago in Puzzles s_dr_13 241 views
1 vote
1 answer
2
A) Ω(n) B) θ(n2) C) Ω(n2) D) θ(n)
answered Jun 14, 2019 in Puzzles yuviabhi 212 views
0 votes
4 answers
3
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 669 views
0 votes
0 answers
4
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 257 views
0 votes
0 answers
5
Need Explanation for this question: int main() { static int i=5; if(--i) { printf("F=%d\n",i); main(); printf("Hai\n"); printf("%d\n",i); } } Output: F=4 F=3 F=2 F=1 Hai 0 Hai 0 Hai 0 Hai 0
asked Sep 23, 2018 in Algorithm Challenges dinesh4756 106 views
0 votes
0 answers
6
0 votes
0 answers
7
the minimal finite automata accepting the set of all strings over { 0, 1} starting with 1 that interpreted as the binary representation of an integer are congruent to 0 modulo 5 has ______ states.
asked Aug 19, 2018 in Puzzles shubham007 160 views
0 votes
2 answers
8
0 votes
1 answer
9
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 166 views
1 vote
0 answers
10
What is expected cut off of nielit held in july, 2017?
asked Aug 16, 2017 in Algorithm Challenges Shivani Jaiswal 998 views
1 vote
1 answer
11
$\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 290 views
2 votes
2 answers
12
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 886 views
2 votes
2 answers
13
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 969 views
0 votes
2 answers
14
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 405 views
1 vote
0 answers
15
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 156 views
0 votes
0 answers
16
Given an arithmetic expression involving *, + only write an object oriented code for its representation and evaluation
asked Jun 6, 2016 in Algorithm Challenges Arjun 274 views
2 votes
1 answer
17
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 628 views
3 votes
1 answer
18
How to generate permutation of a string? What will be the complexity?
answered May 30, 2016 in Algorithm Challenges Arjun 303 views
1 vote
1 answer
19
main() { int arr2D[3][3]; printf("%d\n", ((arr2D==* arr2D)&&(* arr2D == arr2D[0])) ); }
answered May 15, 2016 in Puzzles vijaycs 317 views
1 vote
1 answer
21
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 279 views
6 votes
3 answers
22
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 Apr 13, 2016 in Puzzles pC 754 views
1 vote
1 answer
23
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) 668 views
Help get things started by asking a question.
...