In this example, suppose the statements are simple unless illustrious otherwise. if-then-else statements
if (cond) {
sequence of statements 1
}
else {
sequence of statements 2
}
In this, if-else statement, either sequence 1 will execute, or sequence 2 will execute based on the Boolean condition. In this case the worst-case time is the slower of the two possibilities. For instance, if sequence 1 is O(N2) and sequence 2 is O(1), then the worst-case time for the whole if-then-else statement would be O(N2).