void functionOne(int number) { if (number < 10) time++; else { for (int i= 0; i< number; i++) time++; functionOne(number -2); } } void functionTwo(int number) { if (number < 10) time++; else { for (int i= 0; i< 8; i++) functionTwo(number/2); for (int i= 0; i< number * number; i++) time++; } }
void functionOne(int number) { if (number < 10) time++; else { for (int i= 0; i< number; i++) time++; functionOne(number -2); } } void functionTwo(int number) { if (number < 10) time++; else { for (int i= 0; i< 8; i++) functionTwo(number/2); for (int i= 0; i< number * number; i++) time++; } }
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Find the big-oh runtime for the c++ function given
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps