Atlassian Interview Question

Was a simple take not take DP problem