Finding the maximum of two numbers

The most widespread option of max function implementation is to check the operator of the a-b expression. In this case, we cannot use comparisons operators, but we can use the multiplication operator.   Note The task’s essence is to make everything without switch instructions at the processor level instead of hiding the comparison or…

The task of calendar gaps merging

Let’s suppose you are working in a company and it is developing an electronic calendar. The calendar has a function that shows when various programming teams will be busy at a meeting.   Those periods when the team is busy are marked on the calendar as time ranges, for example, from 10:00 to…

The task of calendar gaps merging

Let’s suppose you are working in a company and it is developing an electronic calendar. The calendar has a function that shows when various programming teams will be busy at a meeting.   Those periods when the team is busy are marked on the calendar as time ranges, for example, from 10:00 to…

The task of the ball with helium in the car

Imagine that you are in a car where a balloon filled with helium is tied to the floor. The windows are closed. You push the gas pedal. What happens to the ball: will it move forward, backwards or will it remain in the same position?   What happens to the ball?   Move…