If an Algorithm contains 3 loops inside, with time complexities O(n), O(n2) and O(n). What will be the the total time complexity?
for (int i = 1; i <= n; i++) {
// code
}
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= n; j++) {
// code
}
}
for (int i = 1; i <= n; i++) {
// code
}