Câu hỏi phỏng vấn Big-O Notation
Câu hỏi

What is the time complexity for "Hello, World" function?

Câu trả lời

The time complexity of a "Hello, World" function is $$O(1)$$.

Explanation:

  • Constant Time Complexity $$O(1)$$: The "Hello, World" function typically involves printing a static string to the console. This operation does not depend on the size of the input or any other variable factors. It executes in a fix...
middle

middle

Gợi ý câu hỏi phỏng vấn

middle

Name some types of Big O complexity and corresponding algorithms

middle

Why do we use Big O instead of Big Theta (Θ)?

senior

What are some algorithms which we use daily that has O(1) , O(n log n) and O(log n) complexities?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào