Tip 1 : Do at least one good project and have great deep knowledge about your role in the project
Tip 2 : Learn at least one language with advanced knowledge and clear all concepts about that language
Tip 3 : Practice at least 10 questions daily on any other coding site.
Tip 1 : Be clear about what you are writing in your resume. Be truthful. Your interview may totally depend on the resume. It depends on the interviewer. So you should be aware of everything you are writing in your resume.
Tip 2 : Make your resume worth selecting. Highlight every project and your contribution so far. Add skills you are good at.



In the case of two closest sums, print the smallest sum.
// Simple C++ program to find the pair with sum closest to a given no.
#include
using namespace std;
// Prints the pair with sum closest to x
void printClosest(int arr[], int n, int x)
{
int res_l, res_r; // To store indexes of result pair
// Initialize left and right indexes and difference between
// pair sum and x
int l = 0, r = n-1, diff = INT_MAX;
// While there are elements between l and r
while (r > l)
{
// Check if this pair is closer than the closest pair so far
if (abs(arr[l] + arr[r] - x) < diff)
{
res_l = l;
res_r = r;
diff = abs(arr[l] + arr[r] - x);
}
// If this pair has more sum, move to smaller values.
if (arr[l] + arr[r] > x)
r--;
else // Move to larger values
l++;
}
cout <<" The closest pair is " << arr[res_l] << " and " << arr[res_r];
}
// Driver program to test above functions
int main()
{
int arr[] = {10, 22, 28, 29, 30, 40}, x = 54;
int n = sizeof(arr)/sizeof(arr[0]);
printClosest(arr, n, x);
return 0;
}
SQL Query to fetch records that are present in one table but not in another table.

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