Tip 1: Start learning data structures at least a year before your placements.
Tip 2: Focus on OOP programs, including inheritance.
Tip 3: Make sure you learn everything about your project.
Tip 1: Mention only those things that you know.
Tip 2: Ensure you have at least two good projects.
It was around 11 am on the morning of September 6, 2022. I was sitting alone in my room; both the assessment round and the interview round were conducted online.
You have to write a function that accepts, a string whose length is “len”, the string has some “#”, in it you have to move all the hashes to the front of the string return the whole string and print it.
char* moveHash(char str[],int n);
Step 1:
Input: Move#Hash#to#Front
Output: ###MoveHashtoFront
Step 2: write moveHash()
char *moveHash(char str[],int n)
{
char str1[100],str2[100];
int i,j=0,k=0;
for(i=0;str[i];i++)
{
if(str[i]=='#')
str1[j++]=str[i];
else
str2[k++]=str[i];
}
strcat(str1,str2);
printf("%s",str1);
}
Step 3: write driver code
int main()
{
char a[100], len;
scanf("%[^\n]s",a);
len = strlen(a);
moveHash(a, len);
return 0;
}
What will be the space required for this piece of code?
int sum (int B[], int n)
{
int s = 0, j;
for (j = 0; j < n; j++)
s = s + B[i];
return s;
}
//Given that size of sizeof(int) = 2 bytes
The code will acquire a space of 2n+8.
There are n elements in the array and the int data type acquires 2 bytes, so there will be 2n bytes acquired.
The int array occupies 4 bytes.
The s variable will occupy 2 bytes.
The j variable will occupy 2 bytes.
so total=2n+4+2+2=2n+8 bytes
You’re giving a mathematical statement and you need to create a correct combination of digits, to make LHS = RHS. Note: One Digit may only be used once, in some cases all the digits may not be available.
?X?+?=20
Marking Scheme
Level Rewards = (Current-Level)2/(Time taken at Level)
Total Rewards = Σ (Rewards at each level)
Tip 1: There can be multiple solutions
First, we will try to solve it incorrectly
Tip 2: 2 x 9+2=20 would be incorrect because we can use only any digit only once
Tip 3: 7 x 2+6=20
3 X 4+8=20
6 x2+8=20
Write a function to solve the following equation a3 + a2b + 2a2b + 2ab2 + ab2 + b3.
Write a program to accept three values in order of a, b and c and get the result of the above equation.
Step 1: initialize the variables
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
int sum;
Step 2: use this expression
sum=(a+b)*(a+b)*(a+b);
printf("%d",sum);
A sum of Rs. 900 amounts to Rs. 950 in 3 years at simple interest. If the interest rate is increased by 4%, it would amount to how much?
Step 1:P=900
T=3
Step 2:SI= 900-950=50
R= 50 x 100/900 x 3 = 50/27
now the rate is increased by 4% and we have a rate % 50/27 ....so the new rate% is =50/27 + 4= 158/27
SI = (900 x 3 x 158)/ 100 x 27 = 158
Step 3 : since Si 158 and P =900 so new amount is 900+158= 1058
This interview round was around 10 am on 12 Sept 2022. I was sitting in -my room all alone waiting for the interviewer to join.
Input: ‘N’= 25, ‘s’ =”Take u forward is Awesome”
Output: 10 11 4
What is a view in SQL? How to create a view? (Learn)
Tip 1: A view is a virtual table based on the result set of an SQL statement. We can create it using the create view syntax.
Tip 2:CREATE VIEW view_name AS
SELECT column_name(s)
FROM table_name
WHERE condition
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which array operation has O(n) worst-case time complexity?