And the only reason it’s related to computer science is that we do stuff with computers and when we want to describe and/or reason about stuff we use math.
So it’s the same as addition/subtraction/multiplication … and so on, there’s nothing special going on
What your text is probably doing is talking about some specific task for which the amount of work required can be described with an expression using logarithms
So again with the room of people to greet.
If there are N people in the room, then it takes
Amount of work to greet them one at a time.
If instead greeting them all at once then it takes
Amount of work.
To walk around a square with a side of size N, you need to walk 4N amount of distance. To fill a square you need to fill N*N amount of space
If you do operations with trees then you’re likely wondering what the distance from the root to a leaf is. If that tree is balanced, then that depth is log N
If you divide an array repeatedly into two parts as part of sorting (quicksort/mergesort), then log N is going to be the depth of that recursion. At each depth level there will be a total amount of N work, so log N depths N times means that these sorting algorithms complete in N * log N amount of work