Directi Placement Papers, Test Pattern, Syllabus – FACE Prep

Directi Placement Papers, Test Pattern, Syllabus – FACE Prep

This article on Directi Placement Papers will focus mainly on the level of Online test that Directi uses to choose its candidates for the final round.



Directi Placement Papers, Test Pattern, Syllabus

The first two rounds, i.e MCQ Round and Coding Round are the termination rounds. If the candidate is able to clear this part of Directi Placement Papers, there is a high chance for him/her to get selected by the company.


In Directi Placement Process several rounds are ramified:


  1. MCQ Round
  2. Coding Round
  3. Technical Round 1
  4. Technical Round 2
  5. HR-cum-Technical Round


MCQ Round


This round of Directi Placement Papers is specifically regulated for the hiring of Operation Engineers and comprises of about 20 questions related to Operating Systems, Computer Networks, Algorithms and Data Structure, and general aptitude.


  • Number of Questions: 20
  • Time allotted: 30 mins
  • Negative Marking: Yes
  • The questions asked were from OS, CN, ALGORITHMS, DS, DBMS, General Aptitude
  • Marking scheme was +5 for correct choice, -1 for wrong choice and 0 for unattempted questions.


Some of the questions asked in this round of Directi Placement Papers:


  1. The sticky bit is set in which directory.
  2. The root DNS make a recursive, simple or complex lookup.
  3. Which among these is not a public IP?
  4. Which scheduling results into starvation?


Coding Round


This coding round of Directi Placement Papers is an online coding round organized on CodeChef and generally includes of 2 to 3 questions. In this round one needs to go through maximum successful test cases to go to the next technical rounds.


  • The question paper is divided into 3 sub-parts with the last one being the bonus part.
  • To complete the coding round,90 mins are given.


Few questions which can be asked in this round of Directi Placement Papers or one can refer to are as follows:


  • Standard 0/1 knapsack problem.
  • Given a binary tree in the form of an array such that 1st element is root. For a node i, 2*i is the left child and 2*i+1 is the right child if they exist, considering 1-based indexing. Now each node has a value, the ith node has value A[i]. You need to tell the max sum path between any 2 leaf nodes.


For building up your skills in technical you can take help of the below-listed links:


DATA STRUCTURES

ALGORITHMS



Directi Placement Papers, Test Pattern, Syllabus

Directi Placement Papers – Previously Asked Questions

Previously asked Directi Coding questions



Previously asked Technical MCQ questions


1. Given two arrays of integers arr and P such that after a cycle an element arr[i] will be at location arr[P[i]]. The task is to find the minimum number of cycles after that all the elements of the array have returned to their original locations.


Answer


Input : arr[] = {1, 2, 3}, P[] = {3, 2, 1}

Output : 2


After first move array will be {3, 2, 1}

after second move array will be {1, 2, 3}


Input : arr[] = {4, 5, 1, 2, 3}, P[] = {1, 4, 2, 5, 3}

Output : 4


2. There is a m*n rectangular matrix where the top-left(start) location is (1, 1) and bottom-right(end) location is (m*n). There are k circles in which each has radius r. If there is any path from start to end without touching any circle then find it out.

The input has values of m, n, k, r and two array of integers X and Y, each of length k. (X[i], Y[i]) is the centre of ith circle.


Answer


Input1 : m = 5, n = 5, k = 2, r = 1,

X = {1, 3}, Y = {3, 3}

Output1 : Possible



Directi Placement Papers, Test Pattern, Syllabus

Here is a path from start to end point.


Input2 : m = 5, n = 5, k = 2, r = 1,

X = {1, 1}, Y = {2, 3}.

Output2 : Not Possible



Directi Placement Papers, Test Pattern, Syllabus


Solution : Check if the centre of a cell (i, j) of the rectangle comes within any of the circles then do not traverse through that cell and mark that as blocked. Mark rest of the cells initially as unvisited. Then use BFS to find out shortest path of each cell from starting position. If the end cell is visited then we will return Possible otherwise Not Possible


Algorithm :


  1. Take an array of size m*n. Initialize all the cells to 0.
  2. For each cell of the rectangle check whether it comes within any circle or not (by calculating the distance of that cell from each circle). If it comes within any circle then change the value of that cell to -1(blocked).
  3. Now, apply BFS from the starting cell and if a cell can be reached then change the value of that cell to 1.
  4. If the value of the ending cell is 1, then return Possible, otherwise, return Not Possible



3.Given n, how many distinct Max Heap can be made from n distinct integers?


Answer


Examples:

Input : n = 3

Output : Assume the integers are 1, 2, 3.

Then the 2 possible max heaps are:

3

/

1 2


3

/

2 1


Input : n = 4

Output : Assume the integers are 1, 2, 3, 4.

Then the 3 possible max heaps are:

4

/

3 2

/

1


4

/

2 3

/

1


4

/

3 1

/

2


Since there is only one element as the root, it must be the largest number. Now we have n-1 remaining elements. The main observation here is that because of the max heap properties, the structure of the heap nodes will remain the same in all instances, but only the values in the nodes will change.


Assume there are l elements in the left subtree and r elements in the right subtree. Now for the root, l + r = n-1. From this we can see that we can choose any l of the remaining n-1 elements for the left sub-tree as they are all smaller than the root.


We know the there are ways to do this. Next for each instance of these, we can have many heaps with l elements and for each of those we can have many heaps with r elements. Thus we can consider them as subproblems and recur for the final answer as:


T(n) = * T(L) * T(R).


Now we have to find the values for l and r for a given n. We know that the height of the heap h = . Also the maximum number of elements that can be present in the h th level of any heap, m = , where the root is at the 0th level. Moreover the number of elements actually present in the last level of the heap p = n ( 1). (since number of nodes present till the penultimate level). Thus, there can be two cases: when the last level is more than or equal to half-filled:



l = 1, if p >= m / 2


(or) the last level is less than half-filled:


l = 1 ((m / 2) p), if p < m / 2


(we get 1 here because left subtree has nodes.


From this we can also say that r = n l 1.


We can use the dynamic programming approach discussed in this post here to find the values of . Similarly if we look at the recursion tree for the optimal substructure recurrence formed above, we can see that it also has overlapping sub problems property, hence can be solved using dynamic programming:


  T(7)

      /

     T(3) T(3)

    / /  

  T(1) T(1) T(1) T(1)


Directi Placement Papers, Test Pattern, Syllabus

c