Ready for LeetCode
Read · 1 of 3
LeetCode skips main
On LeetCode you fill in one method inside a class Solution. LeetCode reads the input, calls your method, and checks what you return. No Scanner, no printing.
The method isn't static there, and LeetCode already imports java.util for you.
1class Solution {2 public int maxProfit(int[] prices) {3 // your code here4 }5}