Tip 1 : Do 500 good quality questions
Tip 2 : Have some decent project in your resume
Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.



An integer 'a' is closer to 'X' than an integer 'b' if:
|a - X| < |b - X| or ( |a - X| == |b - X| and a < b )
if X = 4, 3 is closer to 'X' than 9, as |3-4| < |9-4| i.e., 1 < 5 and if X = 4, 2 and 6 are equally close to it, as |2-4| == |6-4| = 2, but we say 2 is closer to 4 than 6, as 2 is smaller.
You are given a sorted array 'A' of length 'N', two integers 'K' and 'X'. Your task is to print 'K' integers closest to 'X', if two integers are at the same distance return the smaller one.
The output should also be in sorted order
Note:
An integer 'a' is closer to 'X' than an integer 'b' if:
|a - X| < |b - X| or ( |a - X| == |b - X| and a < b )
For Example:
if X = 4, 3 is closer to 'X' than 9, as |3-4| < |9-4| i.e., 1 < 5 and if X = 4, 2 and 6 are equally close to it, as |2-4| == |6-4| = 2, but we say 2 is closer to 4 than 6, as 2 is smaller.



You are given two arrays ‘arr’ of size ‘n’ and ‘queries’ of size ‘q’. For each element ‘q’ in the array 'queries', your task is to find the sum of all elements in the array ‘arr’ which are less than or equal to ‘q’.
For Example: Given Array ‘Arr = { 1, 2, 3, 3, 4, 5, 6, 7, 9, 10}’ And ‘ Queries= { 3, 5}’
Then The Sum Of All Elements Whose Value Is Less Than Or Equal To
‘Queries[0] = 3’ Is ‘ 1+2+3+3 =9’.
‘Queries[1] = 5’ Is ‘1+2+3+3+4+5 =18’.
You have to return the answer of every query { 9, 18}.



1) I used the 2 pointer approach to solve this.
2) Start a pointer at start and another at end. If the char at i or j is special char, move one step further, if not then swap the chars at i and j and repeat the same process.
What is a checkpoint in DBMS?
The Checkpoint is a type of mechanism where all the previous logs are removed from the system and permanently stored in the storage disk.
There are two ways which can help the DBMS in recovering and maintaining the ACID properties, and they are- maintaining the log of each transaction and maintaining shadow pages. So, when it comes to log based recovery system, checkpoints come into existence. Checkpoints are those points to which the database engine can recover after a crash as a specified minimal point from where the transaction log record can be used to recover all the committed data up to the point of the crash.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?