Example of Big O of 2^n
问题 So I can picture what an algorithm is that has a complexity of n^c, just the number of nested for loops. for (var i = 0; i < dataset.len; i++ { for (var j = 0; j < dataset.len; j++) { //do stuff with i and j } } Log is something that splits the data set in half every time, binary search does this (not entirely sure what code for this looks like). But what is a simple example of an algorithm that is c^n or more specifically 2^n. Is O(2^n) based on loops through data? Or how data is split? Or