How to fulfill prerequisites course to get into CS Master's

For the background, I am a mechanical engineering grad who just start to shift my career toward software engineering. I plan to take a master’s degree in CS to advance my knowledge and career in the future. I fulfill the math requirement for the CS program, however, I don’t have the prerequisites course like Data Structure and Algo, etc to fulfill the requirement for the CS-related course.

For example, I got this from KTH CS Master’s degree requirement: Entry requirements for Computer Science | KTH | Sweden

My question is how can I get that course without spending another 4 years in IT-related bachelor’s? I don’t think there is a specific program in my country Indonesia that allows me to just take several courses without joining the bachelor’s study.

Well, you’re going to have to spend some time. I mean, what would you tell a CS grad that wanted to get an MS in CS. Would they be able to skip classes like physics, calculus, etc?

The requirements want courses - you have to give them courses. Some of those courses may have their own requirements.

If your country won’t allow you to take ad hoc courses, maybe see if you can find something online (make sure it is acceptable to KTH). Maybe contact KTH and ask if they have any recommendations.