High-Dimensional Optimization Problems In Average-Case And Worst-Case Settings