search
Log In

Recent questions in Puzzles

0 votes
0 answers
1
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 255 views
0 votes
0 answers
2
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
3
Given f(n) = θ(n), g(n) = Ω(n), h(n) = O(n). Then f(n) + [g(n) ⋅ h(n)] = ? how to solve??
asked Jul 15, 2018 in Puzzles vijju532 202 views
0 votes
0 answers
4
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?
asked Jun 22, 2018 in Puzzles Lakshay Kakkar 238 views
1 vote
1 answer
5
A) Ω(n) B) θ(n2) C) Ω(n2) D) θ(n)
asked Jan 16, 2018 in Puzzles Nils 210 views
0 votes
1 answer
6
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
asked Sep 6, 2017 in Puzzles Priyanka Sen 166 views
1 vote
1 answer
7
main() { int arr2D[3][3]; printf("%d\n", ((arr2D==* arr2D)&&(* arr2D == arr2D[0])) ); }
asked May 15, 2016 in Puzzles Desert_Warrior 317 views
6 votes
3 answers
9
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)
asked Apr 9, 2016 in Puzzles pC 753 views
To see more, click for the full list of questions or popular tags.
...