Coding Challenge Round 1

Quiz
•
Other
•
University
•
Hard
Naqui Naqui
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
Given a function f(n) = f(n-1) + f(n-2) with f(0) = 0 and f(1) = 1, what is the most time-efficient way to compute f(10^6)?
Recursion
Memoized Recursion
Iterative with DP
Matrix Exponentiation
2.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
You are building a function that needs to generate all permutations of a string. What is the time complexity?
O(n)
O(n!)
O(n²)
O(n log n)
3.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
Which algorithm is the most appropriate for solving the "Minimum Spanning Tree" problem in a weighted undirected graph?
Dijkstra’s Algorithm
Floyd-Warshall Algorithm
Kruskal’s or Prim’s Algorithm
Bellman-Ford Algorithm
4.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
You are asked to evaluate the following logic in a scheduling problem:
"Given a list of tasks with start and end times, what’s the maximum number of non-overlapping tasks you can perform?"
Which approach solves this optimally?
Greedy - Sort by start time
Dynamic Programming - Overlapping Intervals
Greedy - Sort by end time
Backtracking with Memoization
5.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
You need to find the number of subarrays with a sum equal to k in an integer array. What technique gives the best performance?
Brute Force O(n²)
Sliding Window O(n)
Prefix Sum + HashMap O(n)
Merge Sort O(n log n)
6.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
You are implementing a caching system with a Least Recently Used (LRU) policy. Which of the following data structure combinations is typically used to achieve O(1) get and put operations?
HashMap + Doubly Linked List
HashMap + Stack
Heap + Array
Queue + Binary Tree
7.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
Suppose you need to design a data structure that supports the following operations in O(1):
1. Insert
2. Delete
3. Get Random Element
Which combination of structures would best serve this purpose?
Stack and Queue
Hash Table and Array/List
Linked List and Stack
Tree and Array
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Tebak Nama Makanan

Quiz
•
University
10 questions
CSS selectores hermanos

Quiz
•
University
9 questions
6441-w8-revision

Quiz
•
University
10 questions
3. Antiguas culturas de oriente-HC

Quiz
•
University
10 questions
tecnicas de conteo

Quiz
•
12th Grade - University
15 questions
Acuerdo 060 de 2001

Quiz
•
University
15 questions
Списки в Java

Quiz
•
University
14 questions
In-Lab5

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Other
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University