Credits :
Solutions in c++ provided by : Nishant Mohan
Solutions in python provided by : Yash Nandwana
Editorialist : Calan Pereira
MCQ’s :
 How to upgrade SQlite the database from a lower version to higher version in android SQlite?
 Using Intent
 Using helper class (Correct)
 Using cursor
 using firebase
 How to pass data between activities in android?
 Intent (Correct answer)
 Content Provider
 Broadcast receiver
 Pubspec Yaml
Blockchain :
 P2P stand for ___________.
 Private to Public
 Public to Private
 Peer to Peer (Correct answer)
 Proof to Proof
 The process of creating new bitcoins is known as __________.
 Financing
 Sourcing
 Mining (Correct answer)
 Proof of stake
DSA :
 what kind of searching method is used to find a maxima or minima in a unimodal function?
 Linear Search
 Binary Search
 Ternary Search (Correct answer)
 exhaustive search
 Which Datastructure uses the FIFO technique.
 Stack
 Heap
 Queue (Correct answer)
 Linked List
General Reasoning :
 x and y are real numbers such that 2log(x – 2y) = log x + log y. What is the value of x/y ?
 1
 4 (Correct answer)
 Either (a) or (b)
 None of these
 The sequence 1, 2, 4, 5, 7, 9, 10, 12, 14, 16, 17,…. has one odd number followed by the next two even numbers, then the next three odd numbers followed by the next four even numbers and so on. What is the 2003rd term of the sequence?
 3953
 3943 (Correct answer)
 3940
 3950
Maths (AI/ML):
 What does a neuron compute?
 A neuron computes an activation function followed by a linear function (z = Wx + b)
 b) A neuron computes a linear function (z = Wx + b) followed by an activation function (Correct answer)
 A neuron computes a function g that scales the input x linearly (Wx + b)
 A neuron computes the mean of all features before applying the output to an activation function
 Which parameter determines the size of the improvement step to take on each iteration of Gradient Descent?
 learning rate (Correct answer)
 epoch
 batch size
 regularization parameter
DBMS / Networking / Security :
 Which of the following is generally used for performing tasks like creating the structure of the relations, deleting relation?
 Code Injection attacks can be handled by
 Server side rendering
 Input validation (Correct answer)
 Client side rendering
 Encrypted communication channel
OS / Hardware :
 An Arduino is an example of a …?
 Rank the following storage drives in terms of speed (lowest to highest).

NVMe SSD < SATA HDD < SATA SSD

SATA HDD < SATA SSD < NVMe SSD (Correct answer)

SATA SSD < NVMe SSD < SATA HDD

SATA HDD < NVMe SSD < SATA SSD.
Linux :
 When is the sudo command not required?

When the user is running as root.

after running the sudo su command successfully.

Both are true. (Correct answer)

None are true.
 Linux is …

a UNIX system.

a UNIX like system. (Correct answer)

a UNIX descendent system.

a UNIX system predecessor.
Devops :
 Which of the following is not a pure containerization service.

crio

lxc

mesos (Correct answer)

ansible
 Which of the following is false about functions of load balancers?

Distributes client requests or network load efficiently across multiple servers

Ensures high availability and reliability by sending requests only to servers that are online

Provides the flexibility to add or subtract servers as demand dictates

None of these (Correct answer)
Backend :
 GraphQL is a
Front End :
 The element used as a container for some text is defined as

span (Correct answer)

div

container

textarea
Coding Problem :
 Find Duplicate
Solution in cpp :
#include<bits/stdc++.h>
using namespace std;
int main(){
int n; cin >> n;
int arr[n];
map<int,int>mapm;
int ans = 1;
for(int i = 0; i < n ; i++){
cin >> arr[i];
mapm[arr[i]]++;
if(mapm[arr[i]]==2){ans = arr[i];}
}
cout << ans << endl;
}
Solution in python :
n = int(input())
a = sorted(list(map(int, input().split())))
ans = None
for i in range(n  1):
if a[i] == a[i + 1]:
ans = a[i]
break
print(ans)
 Find the right combination
C++ Solution :
#include<bits/stdc++.h>
using namespace std;
int main(){
long long x, p;
cin >> x >> p;
cout << px+1 << endl;
return 0;
}
Solution in python :
n, p = map(int, input().split())
print(p  n + 1)
 In The Middle
Solution in c++ :
#include<bits/stdc++.h>
using namespace std;
int main(){
int n; cin >> n;
int arr[n];
for(int i = 0; i < n ; i++){
cin >> arr[i];
}
sort(arr,arr+n);
int mid = (n+1)/2;
mid;
cout << arr[mid] << endl;
}
Solution in python :
n = int(input())
a = list(map(int, input().split()))
a.sort()
print(a[n // 2])
 orz Tree
Solution in c++ :
#include<bits/stdc++.h>
using namespace std;
int main(){
int n; cin >> n;
string s = "orz";
int k = 0;
for(int i = 0; i < n; i++){
k = ni;
k;
// k counts the spaces we have to print befor printing the "orz.." string!
while(k){cout << " ";}
cout << s << endl;
s += "orz";
} return 0;
}
Solution in python :
n = int(input())
for i in range(1, n + 1):
print((n  i) * " " + i * "orz")
 Mersenne Prime Candidate:
Solution in c++ :
#include<bits/stdc++.h>
using namespace std;
int main(){
long long x; cin >> x;
long long mul =1;
bool cond = false;
// x+2 because if mul can be x+1 then also we can get our answer!
while(mul<= x+2){
if(mul1==x){cond = true;}
mul = 2*mul;
}
if(cond){cout << "YES";} else{cout << "NO";}
cout << endl;
}
Solution in python :
n = int(input())
if not ((n + 1) & n):
print("YES")
else:
print("NO")
 Manja
Solution in c++ :
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int n; cin >> n;
long long int arr[n];
for(int i = 0; i < n ; i++){
cin >> arr[i];
}
long long int ans = 999999;
long long int sum = 0;
for(int i = 0;i < n ;i++){
sum+=arr[i];
ans = max(ans,sum);
if(sum<0){sum = 0;}
}
cout << ans << endl;
}
Solution in python :
n = int(input())
a = list(map(int, input().split(" ")))
max_so_far = 1e18  1
max_ending_here = 0
for i in range(n):
max_ending_here = max_ending_here + a[i]
if (max_so_far < max_ending_here):
max_so_far = max_ending_here
if max_ending_here < 0:
max_ending_here = 0
print(max_so_far)