VMware Technical-Other Contributed by Suvija updated on Jul 2019

Vmware Technical Paper

Technical Questions:-

1. An array which is a Post order traversal of a Binary Tree. Write a function to check if the Binary Tree formed from the array is a Binary Search Tree.

2. 8 coins are given where all the coins have equal weight, except one. The odd one may be less weight than the other or it may be heavier than the rest 7 coins. In worst case, how many iterations are needed to find the odd one out?

3. There are at most eight servers in a data center. Each server has got a capacity/memory limit. There can be at most 8 tasks that need to be scheduled on those servers. Each task requires certain capacity/memory to run, and each server can handle multiple tasks as long as the capacity limit is not hit. Write a program to see if all of the given tasks can be scheduled or not on the servers?

4. Given two strings, write an efficient algorithm (in Java) to compare the two of them. Your algorithm should handle all cases

5. You are given a binary array with N elements: d, d, ... d[N - 1]. You can perform AT MOST one move on the array: choose any two integers [L, R], and flip all the elements between (and including) the L-th and R-th bits. L and R represent the left-most and right-most index of the bits marking the boundaries of the segment which you have decided to flip.What is the maximum number of '1'-bits (indicated by S) which you can obtain in the final bit-string?'Flipping' a bit means, that a 0 is transformed to a 1 and a 1 is transformed to a 0 (0->1,1->0).
Input Format:An integer N,Next line contains the N bits, separated by spaces: d d ... d[N - 1]

6. Given a unsorted array. Create a balanced B tree. Whether it is possible to solve this problem algorithm in logarithmic complexity ?.

7. You will get a continuos stream of numbers.... u have to add these numbers to some list (u shouldn't sort it)... and any time user does a pop on the list, we should return the minimum of the list and remove it from the list... the minimum should now point to the next minimum in the list.

8. Given a list of arraylists containing elements, write a function that prints out the permutations of of the elements such that, each of the permutation set contains only 1 element from each arraylist and there are no duplicates in the list of permutation sets.

9. Delete every third element of an array until only one element is remaining. Tell the index of that remaining element in O(1) time complexity.

10. You are given a sorted skewed binary tree. How can you create a binary search tree of minimum height from it?

11. Delete the repeated elements in a singly linked list in O(n) time complexity without using extra space. Linked list contains elements in unsorted order(Sorting is not allowed)

12. A user creates a file test.sh on a linux system. He wishes to give another user on the same system the permission to execute that file. What permissions should he give to the file?

13. Where could we use deadlock? The interviewer was very clear about his question. The use of deadlock.?In which scenario could we use deadlock?

14. What is the difference between paging and swapping? In windows OS, "My Computer", we see the option of paging, what does that mean?

15. When we click on the power button of our Laptop, what happens immediately and how the windows is loaded?

16. Two arrays are given. Data from both the arrays have to be taken and put into the third array and this third array should have only unique elements. Implement this without using set.

17. What is the difference between MVC and Factory pattern?

18. There are two interfaces B and C each having the same method public m1() class A implements B and C If class A has to implement method m1, the implemented method would be of which interface?

19. Reverse a string in place

20. Given +ve numbers in an array . Put the even nos to the left of the array and the odd to the right side of the array . Don't use extra array.