John Wick's Profession: Hint
John Wick's Profession: Hint
John Wick's Profession: Hint
John Wick has lost his memory in a car accident, sadly. But there is one help you can
do for John Wick. Help him recall who he is.
Hint:
If you get more 1's than 0's, John Wick is a doctor.
If you get equal number of 1's and 0's, John Wick is a carpenter.
function foo()
print 1
function soo()
print 0
function zoo()
foo()
soo()
function koo()
foo()
soo()
soo()
function loo()
foo()
foo()
soo()
If the functions run in the following order, tell who is John Wick?
unanswered
Submit
You have used 0 of 1 attemptSome problems have options such as save, reset, hints, or show answer.
These options follow the Submit button.
Can you figure out the number of iterations it will take to execute the following input:
function longRunningFunction(array) {
for ( i = 0; i < length(array); i++ ) {
idx = i
for ( j = i + 1; j < length(array); j++ ) {
if ( array[idx] > array[j] ) {
idx = j
}
}
swap( array[i], array[idx] )
}
}
-1
5
unanswered
Submit
You have used 0 of 1 attemptSome problems have options such as save, reset, hints, or show answer.
These options follow the Submit button.
SBVDFAY
Submit
You have used 0 of 1 attemptSome problems have options such as save, reset, hints, or show answer.
These options follow the Submit button.
1. After Enqueue(x):
o Push(x)
o Push(x mod 3)
2. After x = Dequeue():
o y = Pop()
o Push(x + y)
en
enq de enq enq enq de de enq
qu
ueu qu ueu ueu ueu qu qu ueu
eu
e(1 eu e(1 e(1 e(1 eu eu e(1
e(5
7) e() 1) 9) 5) e() e() 4)
)
unanswered
Submit
You have used 0 of 1 attemptSome problems have options such as save, reset, hints, or show answer.
These options follow the Submit button.
Novel Arrangement
Anaya has three Urdu novels (G, A, D) and Four English novels (C, B, E, F). She wants
to arrange her novels in a way that following conditions must be met:
- No english novel can be placed immediate after another english novel.
C, D, F, A, B, G, E
A, D, B, F, E, G, C
F, A, C, D, B, G, E
E, G, B, D, F, A, C
unanswered
Submit
You have used 0 of 1 attemptSome problems have options such as save, reset, hints, or show answer.
These options follow the Submit button.