VMWare Inc Interview Questions
- 0of 0 votes
AnswersString1 -- "aaabb"
- vivekkumarraju May 18, 2019 in United States
String2 -- "aaabbbb"
String3 -- "aaabbb"
These are sample strings. The problem stated that a given string has to be cut in such a fashion that the remaining characters in the string, say a and b have same character count. If not, then the method returns false.
In case the string already has characters with same frequency of occurrence as in case 3, then just return true. Return type can be assumed to be Boolean.
Tried to solve problem using substring() method in java by running a loop over the string, but could not arrive at a solution.| Report Duplicate | Flag | PURGE
VMWare Inc MTS String Manipulation - 1of 1 vote
Answers# Given a set of strings, print them in Lexicographic order (dictionary/alphabetical order)
- sarunreddy82 July 11, 2018 in United States
# Example,
# Input:
# “ABCDEF”, “AA”, “BEF”, “A”, “AABB”
# Output:
# “A”, “AA”, “AABB”, “ABCDEF”, “BEF”| Report Duplicate | Flag | PURGE
VMWare Inc String Manipulation - 0of 0 votes
Answers
- getPDat February 14, 2018 in United StatesWe encode a string, s, by performing the following sequence of actions: Replace each character with its ASCII value representation. Reverse the string. For example, the table below shows the conversion from the string "Go VMWare" to the ASCII string "711113286778797114101": // Character G o V M W a r e // ASCII Value 71 111 32 86 77 87 97 114 101 // // We then reverse the ASCII string to get the encoded string 101411797877682311117. // // For reference, the characters in s are ASCII characters within the range 10 - 126 which include special characters. // // Complete the decode function in the editor below. It has one parameter: // encoded - A reversed ASCII string denoting an encoded string s. // // The function must decode the encoded string and return the list of ways in which s can be decoded. static Collection<String> decode(String encoded) { }
| Report Duplicate | Flag | PURGE
VMWare Inc Staff Engineer Algorithm - 1of 1 vote
AnswersGiven two strings containing only numbers, return product of the two strings. Strings are large so conversion to interger is not possible.
- DO November 04, 2017 in United States for High Availability| Report Duplicate | Flag | PURGE
VMWare Inc Staff Engineer Algorithm - 1of 1 vote
AnswersVMWare Standard Online Screen
- aonecoding April 18, 2017 in United States
3rd Question Given an array of strings and a long description about the formatting of IPv6 and IPv4 (it took me more than 5 minutes to read the description). Write a function to find if a string is IPv4 or IPv6 address or neither.
4th Question Given an integer array, whenever a duplicate number is found, you may increment it (++). Find the minimum sum of the numbers in the array by keep incrementing the dups until all the numbers are unique.| Report Duplicate | Flag | PURGE
VMWare Inc Software Engineer Algorithm - 2of 2 votes
AnswerVMWare Standard Online Screen
- aonecoding April 18, 2017 in United States
The Online Assessment was called something like Life Cycle Challenge-qpan.
There are 4 questions in total given 60 minutes. The problem description was unexpectedly long that it takes 5 minutes just to read a question.
1st Question Design a function to create BST. Given an integer array, insert the integers into the binary search tree and print all the steps taken.
2nd Question Given an integer, print the index of all the positions in which the binary bit is 1 in order.| Report Duplicate | Flag | PURGE
VMWare Inc Software Engineer Algorithm - 1of 1 vote
AnswersYou have two servers. Both of these servers have an identical file with billion characters except for one single character. These servers are connected over a very slow connection.
- xankar February 15, 2017 in United States
How do you find the different character?
My ans: split those files in to batches of characters of 10,000 (say), now calculate checksum and compare the checksums for the chunks of 10,000 character lines. So now you are just comparing 'ints' and not the files per say. (remember the connection is very slow)
His question: How do you optimize this?| Report Duplicate | Flag | PURGE
VMWare Inc Senior Software Development Engineer Algorithm - 0of 0 votes
AnswersGiven a sorted array, and given a number n, find number of times n occurs in the array.
- bharos92 November 11, 2016 in United States for NSBU| Report Duplicate | Flag | PURGE
VMWare Inc Software Engineer Intern Algorithm - 0of 0 votes
AnswersThe 64-bit representation of a 48-bit address is said to be in canonical form if bits 63 through 48 are either all ones or all zeroes. Implement X86IsCanonicalAddress().
- Mukesh July 07, 2016 in United States| Report Duplicate | Flag | PURGE
VMWare Inc Software Engineer Bit Manipulation - 0of 0 votes
AnswersImplement a function, set_bit_l_to_r(x,y,l,r).
- Mukesh July 07, 2016 in United States
For bits l to r (both inclusive), if they are set in x, also set them in y. Do not change bits of y, if they are not in range l to r, or those bits are not set in x. l and r are 0-based.| Report Duplicate | Flag | PURGE
VMWare Inc Software Engineer Bit Manipulation - 0of 0 votes
AnswersAssume that garbage collector is not there in place or you are implementing a garbage collector for C++. Write the design and sample code for garbage collector implementation
- johnsvakel December 15, 2015 in India for Endpoint Computing
We have 3 classed and Class A, B, C. object of A uses object B and Object of B uses Object of C. How can we track the object existence and clear memory ?
Answer which I suggested : Write a tree (or Graph?)data structure (Garbage collector is a container class holds this data structure) where each node has multiple paths to reach. If any of the node is not having a path to reach then we can clean that memory. This way the garbage collection will work. Please suggest your design as well.| Report Duplicate | Flag | PURGE
VMWare Inc Member Technical Staff Algorithm - 1of 1 vote
AnswersGiven the array of integers containing equal number of even and odd numbers. Rearrange
- zammer May 26, 2015 in India
the array such that even number is at even place and odd number is at odd place.
Example : [2,1,3,4,7,9,24,98]
Answer : 1,2,3,4,7,24,9,98| Report Duplicate | Flag | PURGE
VMWare Inc SDET Algorithm - 0of 0 votes
AnswersCheck binary number is prime or not
- zammer May 26, 2015 in India
input : 1001
output : 9 is not prime number| Report Duplicate | Flag | PURGE
VMWare Inc SDET Algorithm - 0of 2 votes
Answers8 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?
- Gaile April 22, 2014 in United States| Report Duplicate | Flag | PURGE
VMWare Inc Software Engineer / Developer - 1of 1 vote
AnswersAn 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.
- Gaile April 22, 2014 in United States
Eg:
2
1 3
The array given as input would be 1 3 2.
Write a function to say if the tree formed is a Binary Search Tree.
Example 2: 4 is root. 0 is left child of 1 , 1 is left child of 2 and 2 is left child of 4. 5 is right child of 4 and 6 is right child of 5.
4
2 5
1 6
0
0 1 2 6 5 4 is the input array.| Report Duplicate | Flag | PURGE
VMWare Inc Software Engineer / Developer - 0of 0 votes
AnswersThere 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?
- chaitu308 April 12, 2014 in United States
Ex:
Servers capacity limits: 8, 16, 8, 32
Tasks capacity needs: 18, 4, 8, 4, 6, 6, 8, 8
For this example, the program should say 'true'.
Ex2:
Server capacity limits: 1, 3
Task capacity needs: 4
For this example, program should return false.
Got some idea that this needs to be solved using dynamic programming concept, but could not figure out exact solution.| Report Duplicate | Flag | PURGE
VMWare Inc Member Technical Staff Algorithm - 0of 0 votes
AnswersGiven two strings, write an efficient algorithm (in Java) to compare the two of them. Your algorithm should handle all cases
- varunumesh77 March 28, 2014 in United States| Report Duplicate | Flag | PURGE
VMWare Inc Intern - 0of 0 votes
AnswersYou are given a binary array with N elements: d[0], d[1], ... d[N - 1].
- kesar January 02, 2014 in United States
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[0] d[1] ... d[N - 1]
Output:
S
Constraints:
1 <= N <= 100000
d[i] can only be 0 or 1f
0 <= L <= R < n
Sample Input:
8
1 0 0 1 0 0 1 0
Sample Output:
6
Explanation:
We can get a maximum of 6 ones in the given binary array by performing either of the following operations:
Flip [1, 5] ==> 1 1 1 0 1 1 1 0| Report Duplicate | Flag | PURGE
VMWare Inc Problem Solving - 0of 0 votes
AnswersGiven a unsorted array. Create a balanced B tree. Whether it is possible to solve this problem algorithm in logarithmic complexity ?.
- Neutrino December 18, 2013 in Armenia| Report Duplicate | Flag | PURGE
VMWare Inc Intern Algorithm - -3of 3 votes
AnswersYou 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.
- wassp October 23, 2013 in United States| Report Duplicate | Flag | PURGE
VMWare Inc - 0of 0 votes
AnswersGiven 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.
- xmen_wolv October 16, 2013 in United States
Eg: consider the following lists
L1= {a1,b1,c1,d1}
L2={a2,b2,c2}
L3= {a3, b3, c3}
Valid Permutations are:
{a1,b2,c3}
{a1,a2,a3}
{b1,c2,b3}
...
...
..
Please note that
{a1,b2,c3} is same set as {b2,a1,c3}| Report Duplicate | Flag | PURGE
VMWare Inc Member Technical Staff Algorithm - -1of 1 vote
AnswersDelete the repeated elements in a singly linked list in O(n) time complexity without using extra space. Linked list contains elements in unsorted order
- Saurabh Singhal August 22, 2013 in India
P.S. - Sorting is not allowed| Report Duplicate | Flag | PURGE
VMWare Inc Intern Coding Data Structures Linked Lists - 1of 1 vote
AnswersA 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?
- Saurabh Singhal August 22, 2013 in India| Report Duplicate | Flag | PURGE
VMWare Inc Intern Unix - 0of 2 votes
AnswersWhere could we use deadlock? The interviewer was very clear about his question. The use of deadlock.
- Ram August 06, 2013 in India for QATeam
In which scenario could we use deadlock?| Report Duplicate | Flag | PURGE
VMWare Inc Quality Assurance Engineer Threads - 0of 0 votes
AnswersWhat is the difference between paging and swapping?
- Ram August 06, 2013 in United States for QATeam
In windows OS, "My Computer", we see the option of paging, what does that mean?| Report Duplicate | Flag | PURGE
VMWare Inc Quality Assurance Engineer Operating System - 0of 0 votes
AnswersWhen we click on the power button of our Laptop, what happens immediately and how the windows is loaded?
- Ram August 06, 2013 in India for QATeam| Report Duplicate | Flag | PURGE
VMWare Inc Quality Assurance Engineer Operating System - 0of 0 votes
AnswersTwo 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.
- Ram August 06, 2013 in India for QATeam| Report Duplicate | Flag | PURGE
VMWare Inc Quality Assurance Engineer Arrays