O(3^n) exponential time complexity [closed]
To be honest, if you feel like showing the guys teaching your course that their problem statement probably isn’t what they intended, I would just do it this way: for(int i = 0; i < c; i++) { /*your code here*/} This is in O(c), and since O(c) is a strict subset of O(ck) for … Read more