Deloitte Interview Questions | Deloitte Recruitment (2021) - InterviewBit

Before you go!

Take this "Deloitte Interview Questions" interview guide with you

Welcome to Interviewbit, help us create the best experience for you!

Currently, You are a:

Few details about your education

College/University *
Enter the name of your college
Branch *
Year of completion *

Few details about your education

College/University *
Enter the name of your college
Branch *
Year of completion *

Few details about your career...

Current Company *
Enter company name
Experience *

You're all set!

Begin your success journey!

Sign Up using
Full name *
Email *
Password *

By creating an account, I acknowledge that I have read and agree to InterviewBit’s Terms and Privacy Policy .

Welcome back!

Log In using
Email *
Password *

Deloitte Interview Questions

Begin your success journey!

Sign Up using
Full name *
Email *
Password *

By creating an account, I acknowledge that I have read and agree to InterviewBit’s Terms and Privacy Policy .

Welcome back!

Log In using
Email *
Password *

About  Deloitte

Deloitte is a multinational professional services network with offices in over 150 countries and territories across the world.  With headquarters in London, England, Deloitte is one of the Big Four accounting firms and the world's largest professional services network by revenue and number of professionals. It delivers audit, consulting, financial advising, risk management, tax, and associated services to its clients.

It takes precision, professionalism, and extreme competence to get a job at Deloitte. Knowing what to expect and thoroughly preparing for your job interview will help you come off as a well-informed, composed, and capable candidate, as well as help you have a more successful interview experience with one of the world's largest privately-held corporations. If you have the desire, talent, and willingness to cope with cutting-edge technology, Deloitte is the place for you. The eligibility requirements can be seen in the list below.

Eligibility Criteria

  1. B.E./B.Tech in any discipline (CSE/ECE/IT/EEE/TELECOM/M.E/CIVIL, etc.) is required.
  2. M.Sc. Computer Science and Information Technology graduates are eligible to apply. Graduates of the MCA programme are also eligible to apply.
  3. A candidate must have more than 60% marks in 10th and 12th (or diploma).
  4. A candidate must have a minimum of 60% marks in graduation.
  5. After HSC(12th), but not after SSC(10th), or between semesters of graduation, a maximum interval of one year is permitted.
  6. At the time of the selection process, a candidate should not have any outstanding backlogs. If you meet these requirements, you can apply for the Deloitte Placement Process as described above.

Deloitte Recruitment Process

Interview Process

There are generally three rounds to the basic recruitment process of Deloitte:

  1. Online Assessment Round
  2. Group Discussion
  3. Face to Face Interviews: Technical + HR

Interview Rounds

Online Assessment Test

The first stage in the hiring process is an online assessment test. Those who pass this test will be qualified for the next round. This round is categorized into three parts:

  • Quants: During this section, the candidate's mathematical abilities will be assessed. The Quantitative Aptitude component covers Time, Speed & Distance, Number Series, Simple & Compound Interest, Probability, Permutation & Combination, Ratios & Proportions, Percentages, Algebra etc.
  • Logical Reasoning: The candidate's ability to think critically and logically will be assessed in this section. You will be assessed on the following topics in this section: Data Sufficiency, Data Interpretation, Data Arrangements, Logical Word Sequence, Statements and Inferences, Inequalities, Coding, Decoding, Series, Analogy and Visual Reasoning, Data Sufficiency, Data Interpretation, Data Arrangements, Logical Word Sequence, Number series, Blood relations, Pattern recognition etc.
  • English: This component will evaluate the candidates' proficiency in English. The questions in this part will cover topics such as error-spotting, sentence improvement, sentence completion, speech and voices, tenses and articles, synonyms and antonyms among others.

This round can be skipped for the experienced folks depending upon the job profile and company requirements.

Group Discussion

This is the second round of the Deloitte Selection Process, and candidates who passed the first round are eligible to participate in this round. Deloitte frequently gives a case study based on a technical issue that a business has encountered. You'd have 5 minutes to read it and then another 15 minutes to discuss it with the group members. Moderators from Deloitte may also ask you questions regarding your solution.

Technical Interview

Candidates who clear the group discussion round are called for the face to face technical interview round. Technical interviews are used to examine your technical skills – which is usually particular to the role you are looking for – as well as to learn how you think, solve problems, and deal with stressful situations.

To assess your technical skills, you can anticipate being asked a variety of coding and non-coding technical interview questions. Your technical knowledge and skills should meet the job criteria, according to the interviewer. You may also be asked to write code. The interviewer will also assess your problem-solving abilities. You'll be asked about your previous projects and work experiences, as well as what you did and how you used technology and how successful you were. You should be able to describe computer fundamentals to the interviewer, including OOPS, DBMS, CN, OS, and so on. It is vital to know how to program in a specific language. Make certain you are conversant in at least one programming language. You do not need to be fluent in all programming languages, but you should be familiar with at least one, such as C++, Java, or Python. 

The number of technical interviews will depend on how well you did in earlier rounds, your job profile, your experience and the company's needs.

HR interview

An HR interview is conducted to assess your personality, strengths, weaknesses, and ability to handle the role, as well as to check your background and determine if you're the proper fit for this position. Candidates who pass the technical interview will advance to the HR round. They can also inquire about Deloitte's history, such as when the company was founded, its aims, beliefs, and organizational structure, among other topics. As a result, it's essential to be well-prepared for the HR interview.

Understand the role completely, including what they anticipate from you, the skill sets you'll need, and the qualifications you'll need. Examine your resume to make sure you've included all pertinent information about yourself and that the information you've provided is true to the best of your knowledge. Prepare to answer any questions that may be asked based on your resume. If you're asked a question, be confident and honest in your response.

We've put up a variety of frequently asked HR round interview questions that you might be asked during your job interview. 

  • Tell me about yourself. (You can focus a little bit on your family history, your educational qualifications, and then go on to your professional development. When talking about yourself, attempt to include details that will convince the interviewer that you are qualified for the position.)
  • Are you willing to relocate to various parts of India?
  • What are your expectations from this role?
  • Where do you see yourself in 5 years?
  • Tell me about your projects and internships.
  • What made you want to find a new job? (This is a frequently asked question among experienced professionals seeking a job change. Saying you're quitting your current job to pursue a promotion is the simplest approach to react to this question. Make sure you're not criticizing or undermining your current employer.)

Deloitte Technical Interview Questions: Freshers and Experienced

1. What are the differences between stored procedure and triggers in SQL?

Stored procedures are small pieces of PL/SQL code that perform a specific task. The user can call stored procedures directly. It's similar to a program in that it can take some input as a parameter, process it, and return values.

Trigger, on the other hand, is a stored process that executes automatically when certain events occur (eg update, insert, delete in a database). Triggers are similar to event handlers in that they operate in response to a specified event. Triggers are unable to accept input or return values.

Triggers Stored procedures
A trigger is a stored procedure that executes automatically in response to certain events (such as updates, inserts, and deletions). Stored procedures are sections of PL/SQL code that perform a specified operation.
It has the ability to run automatically in response to events. It can be called by the user explicitly.
It is unable to accept input as a parameter. It has the ability to accept input as a parameter.
Transaction statements aren't allowed inside a trigger. Within a stored procedure, we can use transaction statements like begin transaction, commit transaction, and rollback.
Triggers do not have the ability to return values. Values can be returned by stored procedures.

2. What is SMTP (Simple Mail Transfer Protocol) in Computer Networks?

Email is quickly becoming one of the most valuable services available on the internet. SMTP is the most used technique for transferring mail from one user to another over the internet. SMTP is a push protocol that is used to transmit mail. It is an application layer protocol. The client who wants to send the email establishes a TCP connection with the SMTP server and then sends the email via it. The SMTP server is always set to listen. The SMTP process establishes a connection as soon as it detects a TCP connection from any client. The client process sends the letter immediately after successfully establishing a TCP connection. 

3. List the differences between CSMA/CD (Carrier Sense Multiple Access / Collision Detection) and CSMA/CA (Carrier Sense Multiple Access / Collision Avoidance) in Computer Networks.

Carrier Sense Multiple Access / Collision Detection (CSMA/CD) is a carrier transmission network protocol. It is used in the medium access control layer (the layer that monitors the hardware which is responsible for the interaction with the wired, optical or wireless transmission medium). It detects if the shared channel for broadcasting is busy and interrupts the broadcast till the channel becomes available. Collisions in CSMA/CD are identified via broadcast sensing from other stations. In CSMA/CD, when a collision is detected, the transmission is halted and the stations send a jam signal, after which the station waits for a random time context before retransmission.

Carrier Sense Multiple Access / Collision Avoidance (CSMA/CA) is a carrier transmission network protocol. It operates in the same media access control layer as CSMA/CD. Unlike CSMA/CD, which only works after a collision, CSMA/CA works before a collision.

CSMA/CD CSMA/CA
After a collision, CSMA/CD is effective. CSMA / CA is effective before a collision.
CSMA / CD is generally used in wired networks. CSMA / CA is generally used in wireless networks.
CSMA / CD reduces the recovery time only. CSMA/ CA reduces the possibility of a collision.
When a conflict develops, CSMA/CD resends the data frame. The CSMA / CA will convey the intent to send for data transmission first, in case of a collision.

4. What do you understand about tunneling protocol in Computer Networks?

A tunneling protocol is a communications protocol that allows data to be moved from one network to another. Through a technique known as encapsulation, private network communications can be sent via a public network (such as the Internet).

Because tunnelling entails repackaging traffic data into a different format, possibly with encryption as a standard, the nature of communication that passes via a tunnel can be hidden. The data component of a packet (the payload) is used by the tunnelling protocol to carry the packets that actually provide the service. Tunneling follows a layered protocol model, such as the OSI or TCP/IP protocol suites, but frequently breaks the layering by using the payload to convey a service that the network does not normally provide. In the layered approach, the delivery protocol is usually equal to or higher than the payload protocol.

5. What are the pros and cons of star topology in Computer Networks?

In computer networks, a star network is an application of the spoke–hub distribution model. Every host in a star network is linked to a central hub. One central hub serves as a channel for messages in its most basic form. One of the most popular computer network topologies is the star network.

The advantages of star topology are:

  • It's simple to analyse, set up, and change.
  • Only the nodes that have failed are affected. Other nodes are still operational.
  • With few nodes and limited network traffic, fast performance is possible.
  • Adding, deleting, and transferring devices is simple in a Star topology.

The disadvantages of star topology are:

  • Attached nodes are disabled if the Hub or concentrator fails.
  • The expense of setting up a star topology is high.
  • Buses can be significantly slowed by heavy network traffic.
  • The Hub's capacity determines performance.
  • The network could be brought down by a faulty cable or a lack of suitable termination.

6. Discuss the physical layer of the OSI (Open Systems Interconnection) Model in context of Computer Networks.

The physical layer is the lowest layer in the OSI reference model. It is in charge of establishing a physical connection between the devices. Bits of information are stored in the physical layer. It is in charge of sending individual bits from one node to another. When this layer receives data, it converts the signal received into 0s and 1s and sends them to the Data Link layer, which reassembles the frame.

The physical layer's functions are as follows:

  • Bit synchronisation: A clock is provided by the physical layer, which allows the bits to be synchronised. This clock controls both the sender and the receiver, ensuring bit-level synchronisation.
  • Bit rate control: The transmission rate, or the number of bits transferred per second, is likewise defined by the Physical layer.
  • Physical topologies: The physical layer defines the arrangement of devices/nodes in a network, such as bus, star, or mesh topologies.
  • Transmission mode: The physical layer also specifies how data is passed between the two linked devices. Simplex, half-duplex, and full-duplex transmission modes are available.

7. Differentiate between Hash join, Sort Merge join and Nested Loop join in DBMS.

  • Hash-join: A hash join is a form of physical join method that is used to join two tables internally. The fact that the join is an internal join technique implies that we can't see it. The query optimizer does the join selection automatically.
  • Sort Merge Join: In the case of sorted relations, the Sort Merge Join is the quickest join. This join, like the nested loop join, is an internal join. We can't observe or implement the algorithm; all we can do is direct the engine to utilize it. The merge and sort phases of this method are used for combining and sorting tasks, respectively.
  • Nested Loop join: In a nested loop join, the driving table (main) retrieves rows by index range scan, and the driving table's result set is nested with the probing of the other (secondary) table via the index scan method.

8. Differentiate between hierarchical database models and network in DBMS.

Data are grouped into nodes in a tree-like structure in a hierarchical database model. A node can only have one parent node above it. As a result, the data nodes in this model have one-to-many relationships. The Document Object Model (DOM), which is often used in web browsers, is an example of this model.

The network database model is a more sophisticated variation of the hierarchical database architecture. Data is organised in a graph-like structure here as well. One child node, on the other hand, can be connected to several parent nodes. A many-to-many relationship between data nodes is an outcome of this. Network databases include IDMS (Integrated Database Management System) and IDS (Integrated Data Store).

Hierarchical model Network model
The relationship among the records is of the parent-child form. The relationship among the records is in the form of pointers or links
Inconsistencies in data may occur during the update and delete actions. Data inconsistencies do not occur.
It does not support many to many relationships between the data nodes. It does support many to many relationships between data nodes.
It generates a tree structure, and data traversal is a little complicated. It generates a graph structure in which data traversal is simple because each node may be accessed in both directions, i.e. parent-child and vice versa.

9. Explain the DDL (Data Definition Language), DML (Data Manipulation Language) and DCL (Data Control Language) statements in SQL.

  • DDL: The Data Definition Language is a set of SQL queries that are used to specify the database and schema structure, such as CREATE, ALTER, TRUNCATE, DROP, and RENAME.
  • DCL: The Data Control Language is a set of SQL instructions that are used to control user access to the database. It includes operations like GRANT and REVOKE.
  • DML: Data Manipulation Language is used to manage data using SQL queries such as SELECT, INSERT, DELETE, and UPDATE.

10. What is a Kernel in OS?

Kernel is a component of an operating system that manages computer and hardware functions. It primarily oversees memory and CPU functions. It's a crucial part of any operating system. Kernel serves as a link between applications and hardware-based data processing via inter-process communication and system calls.

When an operating system is loaded, the kernel is loaded initially and remains in memory until the operating system is shut down. It's in charge of things like disk utility, task management, and memory management. It determines which processes should be assigned to the CPU and which should be kept in the main memory for execution. It basically serves as an interface between user software and hardware. The kernel's primary goal is to manage communication between software, such as user-level applications, and hardware, such as the CPU and disc memory.

11. What are the advantages and the disadvantages of using threads in context to OS?

Within a process, a thread is a path of execution. Multiple threads can exist in a process. It's an independent control flow within a process. It is made up of a context and a set of instructions to be carried out. Shared memory space is used by threads in the same process. Threads aren't really independent of one another, hence they share their code section, data section, and OS resources with other threads (like open files and signals).

The following are the key benefits of employing threads:

  • There is no need for a specific communication system.
  • Threads improve readability and software structure simplicity.
  • The context switching time (time to switch from one thread to another) is less in threads as compared to processes.
  • With fewer system resources required, the system becomes more efficient.

The following are the main drawbacks of employing threads:

  • Threads can't be reused because they're part of a single process.
  • They tamper with their process's address space.
  • For concurrent read-write access to memory, they require synchronization.

12. How does reference counting deal with objects that are memory allocated in context to OS? When does it fail to reclaim objects?

Every object gains a count of how many times it has been referred to in the context of reference counting. Every time a reference to that item is made, the count is increased. A reference's value is also decremented every time it is deleted. This operation continues until the reference count reaches zero. When an object's reference count reaches 0, the object can be recovered. By preserving a count in each object, reference counting systems may do autonomous memory management. Any object without a reference count can be regarded as "dead," and its memory can be recovered.

In the situation of cyclic references, the reference counting method may fail to reclaim objects. There are no concrete solutions to this problem, therefore it is usually recommended to design architecture without circular references.

13. Why is it that a single serial port is controlled by a single interrupt-driven I/O (input/ output), but a front-end processor, such as a terminal concentrator, is managed by a polling I/O? Answer this in context to OS.

Interrupt is a hardware method by which a device alerts the CPU that it needs its attention. Interruptions might happen at any time. As a result, when the CPU receives an interrupt signal over the indicator interrupt-request line, it suspends the current process and responds to the interrupt by giving control to the interrupt handler, which serves the device. Polling is a procedure in which the CPU checks if the device requires attention on a regular basis. When a device tells the process unit that it wants hardware processing, the process unit polls the I/O device to see if it wants CPU processing. The CPU is constantly checking each and every device connected to it to see if any of them requires hardware attention.

A serial port may have a tiny number of I/O requests, and therefore, interrupts should be used whenever possible. Serial ports in a terminal concentrator are a different matter. A terminal concentrator has several serial ports, which can result in the formation of multiple brief I/O instances, which can increase the system's burden unnecessarily if interrupts are used. Instead, by looping through without the need for I/O, a polling loop can dramatically reduce the amount of burden on the system. Hence, polling is believed to be more efficient than interrupt-driven I/O when the I/O is frequent and of extremely short duration. 

Therefore, we may conclude that interrupts are used for single ports because the frequency of I/O on such a port is low and can be managed successfully, whereas polling is used for many ports because the frequency of I/O grows and the duration is short, which suits polling.

14. Explain transaction atomicity in context to OS.

The transaction process can be thought of as a series of read and write activities on data, followed by a commit operation. Transaction atomicity means that if a transaction fails to finish successfully, the transaction must be aborted, and all modifications made during execution must be rolled back. It indicates that a transaction must seem like a single, non-divisible process. This guarantees that the integrity of the data being updated is preserved. If the concept of atomicity is not applied in transactions, every transaction that is cancelled in the middle may result in data inconsistency because two transactions may be sharing the same data value.

15. What is the difference between declaration and definition for a variable or a function in C?

The declaration of a variable or function simply states that it exists at some place in the program but that no memory has been allocated for it. The declaration of a variable or function is crucial because it informs the program about the type of the variable or function. It also tells the program the arguments, their data types, the order of those arguments, and the function's return type in the case of function declarations. That concludes the declaration.

In relation to the definition, defining a variable or function does more than just declare it; it also allocates memory for that variable or function. As a result, we can consider declaration to be a subset of definition (or declaration as a superset of definition).

Variable:

A variable is defined and declared at the same time in the C programming language. There is no distinction between declaration and definition for a variable in C, in other words.

Example:

int x;

The information, such as the variable name: x and the data type: int, is passed to the compiler and is saved in the symbol table data structure. A memory of size 2 bytes will also be allocated (depending on the type of compiler).

If we merely want to declare variables and not define them, i.e. we don't want to allocate memory space, we can use the following declaration:

extern int x;

Only the information about the variable is sent in this example, and no memory is allocated. The above information informs the compiler that variable an is declared now, but memory for it will be defined later, either in the same file or in a separate file.

Function:

The function declaration provides to the compiler, the name of the function, the number and type of arguments it accepts, and the return type. Consider the following code, for example:

int sum (int, int);

A function named sum is declared with two int arguments and an int return type. At this time, no memory will be allocated.

Allocating memory for the function is based on the function's definition. Consider the following function definition, for example:

int sum (int x, int y)
 {
   return (x+y);
 }

The memory for the function add will be allocated during this function definition. A variable or function can be declared as many times as needed, but it can only be defined once.

16. What are the different storage classes in C?

Storage Classes are used to specify a variable or function's characteristics. These characteristics include scope, visibility, and lifetime, which allow us to track the presence of a variable during the course of a program's execution. The C programming language has four storage classes:

  • Auto: For all variables declared inside a function or a block, this is the default storage class. Auto variables can only be used within the block/function in which they were declared, not outside of it (which defines their scope). They can, however, be accessed outside of their scope using the idea of pointers, which are used to point to the actual memory address where the variables are stored. Whenever they are declared, they are given a garbage value by default.
  • Extern: Extern storage class simply indicates that the variable is defined outside of the block in which it is used. Essentially, the value is assigned to it in a different block, and this can also be overwritten/changed in another block. A regular global variable can also be made extern by including the 'extern' keyword before its declaration or definition in any function or block. This means we're not creating a new variable; instead, we're merely using/accessing the global variable. Variables and functions can have their visibility extended using the extern keyword. The usage of extern in function declarations or definitions is unnecessary because functions are visible throughout the program by default. Its application is implicit. When you use extern with a variable, you're merely declaring it, not defining it.
  • Static: This storage class is used to declare static variables, which are commonly used in C language programs. Static variables have the ability to retain their value even after they have been removed from their scope!. As a result, we can claim that they are only initialised once and exist till the program ends. Because they are not re-declared, no new memory is allocated. They have a limited scope that is limited to the role to which they were assigned. The program's global static variables can be accessed from anywhere in the code. The compiler assigns the value 0 to them by default.
  • Register: This storage class declares register variables, which are similar to auto variables in functionality. The only difference is that if a free registration is available, the compiler tries to store these variables in the register of the CPU. If no free registers are available, these are stored solely in memory. The register keyword is used to define a few variables that will be accessed frequently in a program, which reduces the program's run time. The address of a register variable cannot be obtained via pointers, which is a crucial point to remember.

17. What Is generational garbage collection in context to Java? What makes it so popular?

Generational garbage collection can simply be described as the garbage collector's approach of dividing the heap into a number of generations, each of which will hold objects based on their "age" on the heap. Marking is the initial stage in the waste collection process whenever the garbage collector is turned on. The garbage collector uses this information to determine which memory blocks are in use and which are not. If all objects in a system must be scanned, this can be a lengthy operation.

As more objects are allocated, the list of objects grows longer and longer, causing garbage collection to take longer and longer. However, empirical application study has revealed that the majority of objects are transient. Objects are categorized according to their "age" in terms of how many garbage collection cycles they have survived with generational garbage collection. As a result, the majority of the effort was spread out over several minor and major collection cycles.

Almost all garbage collectors today are multi-generational. This method has become so popular because it has consistently proven to be the best option.

18. What are access specifiers in C++?

Access specifiers specify the accessibility of the members of a class (attributes and methods). That is, it imposes some limitations on class members, preventing them from being directly accessed by external functions. In C++, there are three types of access modifiers:

  • Public: Everyone will have access to all of the class members declared under the public specifier. Other classes and functions can access the data members and member functions specified as public. The direct member access operator (.) with the object of a class can be used to access the public members of that class from anywhere in the program.
  • Private: Only the member functions within the class can access the class members that have been declared as private. They can't be accessed directly from outside the class by any object or function. The private data members of a class can only be accessed by member functions or friend functions.
  • Protected: Protected access modifier is similar to a private access modifier in that it can only be accessed outside of its class with the help of a friend class; but, class members defined as Protected can also be accessed by any subclass(derived class) of that class. Depending on the modes of inheritance, this access through inheritance can change the access modifier of the members of the base class in the derived class.

19. We need to reverse the order of the first k members of a queue of numbers, leaving the other elements in the same relative order, given an integer k and a queue of integers. Only the standard operations like enqueue, dequeue, size and front are allowed.

Using an auxiliary stack is the strategy.

  • Create a stack that is empty.
  • Dequeue the first k items from the provided queue one by one and then stack the dequeued items.
  • Backfill the queue with the contents of the stack.
  • Dequeue (size-k) elements from the front and add them to the same queue one by one.

Here is the C++ implementation of the algorithm discussed:

// C++
void reverseFirstKElements(int k, queue<int>& Q)
{
    if (Q.empty() || k > Q.size())
        return;
    if (k <= 0)
        return;

    stack<int> S;
    int i = 1;
    /* Push the first k elements of the Queue into the Stack*/
    while (i <= k) {
        S.push(Q.front());
        Q.pop();
        i++;
    }

    /* Enqueue the elements of the stack at the end of the queue*/
    while (S.empty() == false) {
        Q.push(S.top());
        S.pop();
    }

    /* the remaining elements to be
      enqueued at the end of the Queue*/
    for (int i = 0; i < Q.size() - k; i++) {
        Q.push(Q.front());
        Q.pop();
    }
}

We dequeue the first k elements from the queue Q and push them into the stack S. We then insert the elements from S to Q. Then (size-k) elements are removed from the front and added to Q one by one.

20. Given a two-dimensional boolean array with each row sorted. There are m rows and n columns in the matrix. Find the row that has the most 1s in it.

  • Brute force method: An easy way is to traverse the matrix row by row, counting the amount of 1s in each row, and comparing the count to the maximum. Finally, with a maximum of 1s, return the index of the row. This approach has an O(m*n) time complexity, where m is the number of rows and n is the number of columns in the matrix.
  • Optimized approach using binary search: We can still do better. We can use Binary Search to count the number of 1s in each row because each row is sorted. In each row, we obtain the index of the first occurrence of 1. The entire number of columns minus the index of the first 1 will equal the number of 1s. The time complexity for this approach will be O(mlogn).
  • Further Optimization: The previous solution can be improved somewhat more. Instead of performing a binary search in each row, we first determine whether the row has more 1s than the maximum number of 1s. If there are additional 1s in the row, only count the 1s. We also don't execute a binary search across the entire row to count 1s in a row; instead, we search before the index of the last max. The worst-case time complexity is also O(mLogn), but the will solution performs better on average.
int rowWMax1s(bool matrix[m][n])
{
   int i, index;
   // Initialize maximum by using the values of the first row.
   int max_rowIndex = 0;
   int maximum = first(matrix[0], 0, C - 1);
   // count number of 1s while traversing each row
   // by checking the index of the first 1
   for (i = 1; i < m; i++)
   {
       // Count 1s for this row only; if this row
       // has greater number of 1s than maximum so far
       if (maximum != -1 && matrix[i][n - maximum - 1] == 1)
       {
           index = first (matrix[i], 0, n - maximum);
           if (index != -1 && n - index > maximum)
           {
               maximum = n - index;
               max_rowIndex = i;
           }
       }
       else
       {
           maximum = first(matrix[i], 0, n - 1);
       }
   }
   return max_rowIndex;
}

Here, the variable maximum is first initialized by using the values of the first row. We then check to see if the row has more 1s than the maximum number of 1s. Only count the 1s if there are any more in the row. To count 1s in a row, we don't run a binary search across the full row; instead, we search before the index of the last maximum.

21. What is a session in PHP?

In PHP, a session is a means to save data that can be utilized across various pages of a website. Unlike cookies, the information is not saved on the user's machine. The session will generate a file in a temporary directory on the server to hold registered session variables and their values. During that visit, this information will be available on all pages of the site. 

When working with an application, you open it, make changes to it, and then close it. The computer is aware of when you start and stop the application. However, because the HTTP address does not retain a state on the internet, the webserver has no idea who you are or what you do. Session variables are used to solve this problem by saving user information that can be used across many pages (e.g. username, favourite colour, etc). Session variables are lasting until the user closes the browser. Session variables, on the other hand, store information about a single user and are accessible from all pages in a single application.

22. List the differences between Echo and Print in PHP.

The functions of echo and print are nearly identical. Both are used to display info on the screen.

The differences are minor: 

  • Echo returns nothing, whereas print returns 1 and can be used in expressions.
  • While echo can take many parameters, print only takes one.
  • Because echo does not return a value, it is faster than print.

Example:

<!DOCTYPE html>
<html>
<body>
<?php
print "PHP is fun!<br>";
echo "PHP is fun.<br>";
echo "PHP ", "is ", "fun.";
?> 
</body>
</html>

Output:

PHP is fun!
PHP is fun.
PHP is fun.

The above example shows that echo can take many parameters whereas print cannot. We obtain a syntax error if we try to pass multiple parameters into print. 

23. What is the Man-in-the-Middle Attack in context to Cyber Security?

A man-in-the-middle attack is a cyber threat (a form of eavesdropping assault) in which a cybercriminal wiretaps a conversation or data transmission involving two people. When a cybercriminal joins a two-way chat, they appear to be authentic participants, giving them the ability to gather sensitive information and respond in a number of ways. The main purpose of this type of attack is to gain access to personal information about our enterprise or consumers. A cybercriminal could, for example, intercept data flowing between the target device and the network on an unprotected Wi-Fi network.

As we can understand from the image, a man-in-the-middle attack is a form of eavesdropping attack in which an attacker intercepts a conversation or data transfer in progress. The attackers pose as both genuine participants after inserting themselves in the "middle" of the transfer. This allows an attacker to intercept data and information from both parties while also providing malicious links or other information to both genuine participants in a way that may not be detected until it is too late.

24. Discuss honeypots in context to Cyber Security.

Honeypots are attack targets put up to study how different attackers try to exploit vulnerabilities. Honeypot is a spoof computer system that keeps track of all user transactions, interactions, and behaviours. The same idea, which is extensively utilised in academic settings, can be employed by private companies and governments to assess their risks.

Production Honeypots and research Honeypots are the two types of Honeypots available.

  • Production Honeypot: Its purpose is to collect genuine data in order for the administrator to access vulnerabilities. To improve security, they're usually installed inside production networks.
  • Research Honeypot: It is employed by educational institutions and organisations for the sole aim of examining the back-hat community's reasons and strategies for targeting various networks.

25. What is YARN in Hadoop?

Yet Another Resource Negotiator is abbreviated as yarn. It is Hadoop's resource management layer. YARN was first released in Hadoop 2.x. To execute and process data saved in the Hadoop Distributed File System, Yarn includes a number of data processing engines, including graph processing, batch processing, interactive processing, and stream processing. Yarn also provides employment scheduling services. It extends Hadoop's capabilities to other emerging technologies, allowing them to benefit from HDFS and cost-effective clusters.

Hadoop 2.x's data operating technique is Apache Yarn. It comprises a "Resource Manager" master daemon, a "Node Manager" slave daemon, and Application Master.

26. What is Heartbeat in Hadoop?

Because the Namenode and Datanode in Hadoop are two physically separate machines, Heartbeat is the signal transmitted by the Datanode to the Namenode at regular intervals to confirm its existence, i.e. that it is alive. If Namenode does not receive a heartbeat from a Datanode within a specific timeframe (usually 10 minutes), Namenode considers the Datanode to be dead. Along with the heartbeat, the Datanode also transmits the block report to Namenode, which normally contains a list of all the blocks on the Datanode.

27. What role does Distributed Cache play in Apache Hadoop?

Hadoop offers a valuable utility feature called Distributed Cache that boosts job performance by caching files used by applications. Read-only files, zips, and jar files can all be distributed using Distributed Cache. Using JobConf settings, an application can designate a file for the cache. The Hadoop framework copies these files to the nodes where a task must be completed. This is done before the task execution begins.  

Useful Interview Preparation Resources:

Java Interview

Power BI Interview

Automation Testing Interview

Salesforce Interview

Data Scientist Interview

Hadoop Interview

Online Coding Platform

Deloitte Interview Preparation

Interview Preparation Tips

  • Examine the job profile for which you have applied or for which you have an interview planned. Understand the role completely, including what they anticipate from you, the skill sets and the qualifications you'll need. Make sure you have all of the necessary information. This will prevent you from being caught off guard on the day of the interview.
  • The first step toward a successful interview is "self-confidence." You've already completed half of the task if you're confident enough. Always keep a cheerful attitude and a smile on your face.
  • The more you prepare for the interview, the better your chances of succeeding are. Learn everything there is to know about interview stages, rounds, and questions, among other things. Answers to popular HR and management interview questions should be prepared ahead of time. Keep an eye on your technical subjects and final year project. You can also read about the company's achievements, organizational structure, vision, work-life balance, and other topics.
  • Examine your resume carefully and ensure you've included all relevant information about yourself and that the information you've provided is correct to the best of your knowledge. If there is a hiatus in your studies or if you have taken some time from work, make sure you are prepared with a favourable response.

Frequently Asked Questions

1. Are Deloitte interviews hard?

Whether the Deloitte interview is challenging or simple makes no difference. The truth is that the more you prepare for the interview, the better your chances of succeeding are. Learn everything there is to know about interview stages, rounds, and questions, among other things. Understand the role completely, including what they anticipate from you, the skill sets you'll need, and the qualifications you'll need.

2. Where do you see yourself in 5 years?

Tell them that you wish to learn about and master a specific technology. You should be able to persuade them that you intend to stay with the organization for a longer time. "I want to be more skilled, more confident, and maintain a prominent position in your firm," you might remark. For seasoned professionals, you can begin by saying, "Within the next five years, I want to be recognized as an authority in this subject." The recruiter is solely interested in learning how long you expect to stay with the company and how happy you are with the current role for which you will be employed.

3. What is your salary expectation?

This is a difficult one. You may or may not opt to quote the actual amount, but you must inform them of the percentage raise you are considering. Don't ask for a certain salary; instead, demonstrate your devotion to the position.

4. What is the starting salary for freshers in Deloitte?

The starting salary for freshers at Deloitte averages around 4.5 lakhs per annum.

5. Why should we hire you Deloitte?

The interviewer is trying to figure out whether you'd be a good fit for their company. As a result, you'll have to convince them. "I am a quick learner who can swiftly assimilate something new to me," is how you can frame it. Here you can talk about your abilities, skills, and past experiences, as well as how you can add something new to the role.

6. What are your strengths and weaknesses?

Here, be honest about your strengths and weaknesses. You may have several strengths but concentrate on the ones that will aid you in this position. Mention your flaw in the same way. Be sure to express how you plan to overcome your weakness as soon as you acknowledge it.

The following are some examples of strengths that can be addressed in an interview:-

  • Versatile and goal-oriented.
  • The ability to communicate.
  • Pressure-handling ability
  • Ability to lead.

Some of the flaws that people mention in an interview are listed below.

  • Excessive attention to detail.
  • Anxiety about speaking in front of a group.
  • Self-critical.

7. How do you handle stress or tight deadlines?

Employers are looking for instances of how stressful conditions motivate you or how you may minimize stressful situations with proper planning and good communication skills. Give an example of how you dealt with a challenging scenario at a previous job to demonstrate your ability to perform under pressure.