Write a Python function to solve a basic scheduling problem and analyze its time and space complexity using Big O notation.
Given a list of intervals represented as [start, end], return the maximum number of non-overlapping intervals that can be selected. An interval ending at time t may be followed by one starting at time t. Use the signature def max_non_overlapping(intervals): and return an integer.
def max_non_overlapping(intervals):