code optimization
space complexity optimization