Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
This round had 1 simple coding question followed by some questions from DBMS and MySQL.
Approach :
1) Iterate from 2 to sqrt(n) (where n is the no. to be checked) and check if n%i==0 or not.
2) If n%i==0 where ( i >=2 and i<=sqrt(n) ), then n is not a prime number .
3) Else , n is a prime number
//Code :
import java.io.*;
public class temp {
static boolean isPrime(int n)
{
for(int i=2; i*i<=n; i++)
{
if(n%i==0)
return false;
}
return true;
}
public static void main(String args[])
{
if (isPrime(11))
System.out.println(" true");
else
System.out.println(" false");
if (isPrime(15))
System.out.println(" true");
else
System.out.println(" false");
}
}
TC : O( sqrt(n) )
SC : O(1)
What is meant by normalization and denormalization?
Normalization is a process of reducing redundancy by organizing the data into multiple tables. Normalization leads to better usage of disk spaces and makes it easier to maintain the integrity of the database.
Denormalization is the reverse process of normalization as it combines the tables which have been normalized into a single table so that data retrieval becomes faster. JOIN operation allows us to create a denormalized form of the data by reversing the normalization.
Explain the concept of ACID properties in DBMS.
ACID properties are a combination of Atomicity, Consistency, Isolation, and Durability properties. These properties
prove to be very helpful in allowing a safe and secure way of sharing the data amongst multiple users.
Atomicity: When changes are being done to the data it feels as though a single operation is performed. In other
words, either all the changes are performed, or none of them is performed.
Consistency: Data must be in a consistent state at the beginning of the transaction as well as the end of the
transaction.
Isolation: As the name itself suggests, this ensures that each transaction that occurs is in isolation from others.
Simply put a transaction that has started but not yet completed should be in isolation with others, this is done so that
the other transaction does not get impacted with this transaction.
Durability: In the event of system failure, after the transaction is completed, changes to the data persist and are not
undone. Hence, due to this property data is always in a durable state.
Difference between CHAR and VARCHAR
Following are the differences between CHAR and VARCHAR :
1) CHAR and VARCHAR types differ in storage and retrieval
2) CHAR column length is fixed to the length that is declared while creating table. The length value ranges from 1 and 255
3) When CHAR values are stored then they are right padded using spaces to specific length. Trailing spaces are removed when CHAR values are retrieved.
What are MySQL Triggers?
A trigger is a task that executes in response to some predefined database event, such as after a new row is added to a particular table. Specifically, this event involves inserting, modifying, or deleting table data, and the task can occur either prior to or immediately following any such event.
Triggers have many purposes, including :
1) Audit Trails
2) Validation
3) Referential integrity enforcement
This round was majorly inclinded towards questions from Operating Systems and DBMS. I was also asked to execute an SQL query in this round.
What is the use of DROP command and what are the differences between DROP, TRUNCATE and DELETE commands?
DROP command is a DDL command which is used to drop/delete the existing table, database, index or view from the database.
The major difference between DROP, TRUNCATE and DELETE commands are:
DROP and TRUNCATE commands are the DDL commands which are used to delete tables from the database and once the table gets deleted, all the privileges and indexes that are related to the table also get deleted. These 2 operations cannot be rolled back and so should be used only when necessary.
DELETE command, on the other hand, is a DML Command which is also used to delete rows from the table and this can be rolled back.
Second Highest Salary
Approach : Sort the distinct salary in descend order and then utilize the LIMIT clause to get the second highest salary.
Query :
SELECT DISTINCT Salary
FROM Employee
ORDER BY Salary DESC
LIMIT 1 OFFSET 1;
What is Cursor? How to use a Cursor?
A database cursor is a control structure that allows for the traversal of records in a database. Cursors, in addition, facilitates processing after traversal, such as retrieval, addition, and deletion of database records. They can be viewed as a pointer to one row in a set of rows.
Working with SQL Cursor:
1) DECLARE a cursor after any variable declaration. The cursor declaration must always be associated with a SELECT Statement.
2) Open cursor to initialize the result set. The OPEN statement must be called before fetching rows from the result set.
3) FETCH statement to retrieve and move to the next row in the result set.
4) Call the CLOSE statement to deactivate the cursor.
5) Finally use the DEALLOCATE statement to delete the cursor definition and release the associated resources.
What is a bootstrap program in OS?
It is generally a program that initializes OS during startup i.e., first code that is executed whenever computer system startups. OS is loaded through a bootstrapping process or program commonly known as booting. Overall OS only depends on the bootstrap program to perform and work correctly. It is fully stored in boot blocks at a fixed location on the disk. It also locates the kernel and loads it into the main memory after which the program starts its execution.
Explain demand paging?
Demand paging is a method that loads pages into memory on demand. This method is mostly used in virtual memory. In this, a page is only brought into memory when a location on that particular page is referenced during execution. The following steps are generally followed :
1) Attempt to access the page.
2) If the page is valid (in memory) then continue processing instructions as normal.
3) If a page is invalid then a page-fault trap occurs.
4) Check if the memory reference is a valid reference to a location on secondary memory. If not, the process is terminated (illegal memory access). Otherwise, we have to page in the required page.
5) Schedule disk operation to read the desired page into main memory.
6) Restart the instruction that was interrupted by the operating system trap.
What do you know about OLTP and OLAP?
OLTP :
1) OLTP stands for Online Transaction Processing, is a class of software applications capable of supporting transaction-oriented programs.
2) An important attribute of an OLTP system is its ability to maintain concurrency.
3) OLTP systems often follow a decentralized architecture to avoid single points of failure.
4) These systems are generally designed for a large audience of end-users who conduct short transactions.
5) Queries involved in such databases are generally simple, need fast response times, and return relatively few records.A number of transactions per second acts as an effective measure for such systems.
OLAP :
1) OLAP stands for Online Analytical Processing, a class of software programs that are characterized by the relatively low frequency of online transactions.
2) Queries are often too complex and involve a bunch of aggregations.
3) For OLAP systems, the effectiveness measure relies highly on response time.
4) Such systems are widely used for data mining or maintaining aggregated, historical data, usually in multi-dimensional schemas.
This is a cultural fitment testing round. HR was very frank and asked standard questions. Then we discussed about my
role.
Why should we hire you ?
Tip 1 : The cross questioning can go intense some time, think before you speak.
Tip 2 : Be open minded and answer whatever you are thinking, in these rounds I feel it is important to have opinion.
Tip 3 : Context of questions can be switched, pay attention to the details. It is okay to ask questions in these round,
like what are the projects currently the company is investing, which team you are mentoring. How all is the work
environment etc.
Tip 4 : Since everybody in the interview panel is from tech background, here too you can expect some technical
questions. No coding in most of the cases but some discussions over the design can surely happen.
Tell me something not there in your resume.
If you get this question, it's an opportunity to choose the most compelling information to share that is not obvious from
your resume.
Example :
Strength -> I believe that my greatest strength is the ability to solve problems quickly and efficiently, which makes me
unique from others.
Ability to Handle Pressure -> I enjoy working under pressure because I believe it helps me grow and become more
efficient .
Tip : Emphasize why you were inspired to apply for the job. You can also explain that you are willing to invest a great
deal of energy if hired.
These are generally very open ended questions and are asked to test how quick wit a candidate is. So there is
nothing to worry about if you have a good cammand over your communication skills and you are able to propagate
your thoughts well to the interviewer.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which keyword is used for inheritance?