VMware 2024 Papers
Previous year papers with coding questions
Practice VMware placement paper coding questions with detailed solutions. Access VMware OA coding problems in Java, C++, Python.
This page contains VMware coding questions from VMware OA placement papers with detailed solutions.
VMware OA Coding Section:
Solution (Java):
public int scheduleVMs(int[] vms, int k) { // Greedy approach: assign VMs to least loaded host PriorityQueue<Integer> hosts = new PriorityQueue<>(); for (int i = 0; i < k; i++) { hosts.offer(0); }
for (int vm : vms) { int minLoad = hosts.poll(); hosts.offer(minLoad + vm); }
int maxLoad = 0; while (!hosts.isEmpty()) { maxLoad = Math.max(maxLoad, hosts.poll()); } return maxLoad;}Time Complexity: O(n log k)
VMware 2024 Papers
Previous year papers with coding questions
VMware Main Page
Complete VMware placement guide
Practice VMware coding questions regularly!