# 3i Infotech Papers: Sample Questions 1007 - 1009 of 1245

Examrace Placement Series prepares you for the toughest placement exams to top companies.

## Question number: 1007

Short Answer Question▾

### Write in Short

What is flag, bus?

### Explanation

Flag

• Flag is nothing but the resister of bit, it is also

• Referred as program status word.

• Which gives the status of the resister after performing the operation?

BUS

• Bus is nothing but the group or collection of wires.

• Used for the data transmission in the applications.

## Question number: 1008

Essay Question▾

### Describe in Detail

What is meant by cookies? Explain in the main features?

### Explanation

• A cookie is a message given to a web browser by a web server.

• Cookie keeps the state in the otherwise stateless http.

• The browser stores cookie in a text file.

• Cookie is sent back with each browser request.

• Features:

• Server script sends a cookies to the browser- name, age, or identification number etc.

• Browser stores this information on local machine for future use.

• Next time browser sends request with the cookie, server uses that information to identify the user.

## Question number: 1009

Essay Question▾

### Describe in Detail

What is the efficiency of merge sort

### Explanation

Assuming sorting of n elements in the entire array.

Step 1:

• The divide step takes constant time, regardless of the sub array size.

• Divide step computes the midpoint q of the indices p and r.

• We indicate constant time by .

Step 2:

• The conquer step, recursively sorts two subarrays of approximately elements.

• Account for that time when considering the subprograms.

Step 3:

• The combine step merges a total of n elements, taking time.

• The running time of two recursive calls on element- depends on the running merge sort on element array Sub Problem Size in Diagram Sub problem size in diagram
• Each of sub problem size recursively sorts two subarrays of

• Now the problem is to find total merging time for all subproblems of size Diagram of the Sub Problem Size Diagram of the sub problem size
• We now get down to subprograms of size 1: the base case.

• Spend time to sort subarrays of size 1.

• Each base takes time. Figure of the Sub Problem Size Figure of the sub problem size
• We know how long merging takes for each subproblem size.

• For example, tree with 8 elements has 3 levels n = 4,2, 1.

• Total time for merge sort is the sum of merging times for all the levels.

• Now this ties would be same as binary search,

• When we use big notation to describe this running time.

• Low order term (+1) and the constant coefficient can be discarded.

• Thus running time is the efficiency of merge sort.