Question 1
In competitive programming problems requiring the Next Greater Element (NGE) for every element in an array of size N, which data structure and strategy achieves an optimal overall time complexity of O(N)?
Correct Answer:
A monotonic decreasing stack that processes array elements from right to left, popping smaller elements before recording the top
Question 2
In a directed graph where every edge weight is either 0 or 1, which algorithm finds the single-source shortest path to all vertices in O(V + E) time without the logarithmic overhead of standard Dijkstra?
Correct Answer:
0-1 BFS using a double-ended queue (std::deque), pushing 0-weight edges to the front and 1-weight edges to the back
Question 3
When implementing a Disjoint Set Union (DSU / Union-Find) data structure with both path compression and union by rank (or size), what is the amortized time complexity per find/union operation?
Correct Answer:
O(alpha(N)) amortized time per operation, where alpha is the extremely slow-growing inverse Ackermann function
Question 4
Which of the following statements is TRUE regarding an in-order traversal (percurso em ordem) of a valid Binary Search Tree (BST) containing distinct integer keys?
Correct Answer:
The traversal visits keys in strictly increasing (ascending) numerical order
Question 5
What is the time complexity of building a Binary Heap (Build-Heap) from an arbitrary unsorted array of N elements using Floyd's bottom-up heapify algorithm, compared to inserting elements one by one into an initially empty heap?
Correct Answer:
O(N) for bottom-up Build-Heap, versus O(N log N) for N successive insertions
Question 1
Exam overview

About this Exam

Prepare with the OBI Practice Questions - Olimpíada Brasileira de Informática Exam practice quiz. This question bank includes 100 questions covering complexity, array, algorithm, size, and graph. Use it to review important concepts, identify knowledge gaps, and build confidence for the related exam, course, or assessment.

More details

Additional Information

OBI Practice Questions - Olimpíada Brasileira de Informática Exam

This practice set contains 100 questions from the matching question bank and focuses on complexity, array, algorithm, size, and graph. Work through each question carefully, review the provided solutions, and revisit topics that need more study before your next attempt.

This is an independent study resource intended for practice and review; it is not an official examination or an endorsement by any organization named in the title.

Quiz information

Frequently Asked Questions

The complete question count is available after full access is unlocked.
No fixed duration is currently configured for this quiz.
Question explanations are included where they are available in the quiz content, helping you review the reasoning after answering.
Yes. You can retake the practice test again as you continue studying during your available access period.
After your access is confirmed, you can continue into the complete practice exam from this quiz flow.
Unless explicitly stated otherwise, this page provides independent practice material for study and exam preparation and is not the official examination itself.
Keep studying

Related Questions