Back to Browse

Bus Conductor | GFG POTD | Minimum Moves Problem | Java Solution

76 views
Dec 19, 2025
9:03

In this video, we solve GeeksforGeeks Problem of the Day – *Bus Conductor* using Java. 🔹 *Problem Overview:* You are given positions of chairs and passengers. Each passenger can move left or right by 1 unit per move. The goal is to assign every passenger a unique chair using the minimum number of moves. 🔹 *Key Idea:* * Sort both chairs[ ] and passengers[ ] * Match them index-wise * Sum the absolute differences *Problem Link: * https://www.geeksforgeeks.org/problems/bus-conductor--170647/1 *Code Link: * https://github.com/sibasundarj8/java-DSA/blob/main/Sorting/Sorting_Bus_Conductor.java 👍 Like | 💬 Comment | 🔔 Subscribe for daily GFG POTD solutions #gfgpotd #geeksforgeekspotd #busconductorgfg #busconductorproblem #gfgproblemoftheday #gfgdailyproblem #javadsa #dsainjava #sorting #greedyalgorithm #minimummovesproblem #gfgjavasolution #codinginterview #arrayproblems #javacodinginterview #competitiveprogramming #dailydsapractice #codinginterview #gfgpractice #codinginterview #problemoftheday

Download

0 formats

No download links available.

Bus Conductor | GFG POTD | Minimum Moves Problem | Java Solution | NatokHD