Courses
Tutorials
Interview Prep
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.4K+ articles
Python
19.6K+ articles
Experiences
15.8K+ articles
Searching
1.0K+ articles
Analysis of Algorithms
187+ articles
Data Structures and Algorithms-QnA
44+ articles
Algorithms-Searching
29+ articles
Algorithms-Divide and Conquer
9+ articles
In-house
+ articles
Ternary Search
12 posts
Recent Articles
Popular Articles
Ternary Search in Python
Last Updated: 23 July 2025
Ternary Search is a searching technique used to determine theminimumormaximumof aUnimodal function. Ternary Search divided the search space intothree partsand then remove ...
read more
Searching
Picked
DSA
Python-DSA
Ternary Search
Time and Space Complexity of Ternary Search
Last Updated: 23 July 2025
The time complexity of Ternary Search is O(log3 N), where N is the size of the array. In terms of space complexity, ternary search requires only O(1) auxiliary space, as i...
read more
DSA
Ternary Search
Is ternary search faster than binary search?
Last Updated: 23 July 2025
Binary search is a widely used algorithm for searching a sorted array. It works by repeatedly dividing the search space in half until the target element is found. Ternary ...
read more
DSA
Ternary Search
Data Structures and Algorithms-QnA
In which situation we can use ternary search?
Last Updated: 23 July 2025
Ternary search is a divide-and-conquer search algorithm that works on sorted arrays. It is similar to binary search, but it divides the array into three parts instead of t...
read more
Analysis of Algorithms
Searching
DSA
Ternary Search
Data Structures and Algorithms-QnA
Find the minimum value of a UniModal function
Last Updated: 23 July 2025
Given a Unimodal Function f(x) = A(x * x) + Bx + C and a range for the value of x in the form of [L, R], the task and is to find the minimum value of f(x) where the value ...
read more
Picked
DSA
Algorithms-Searching
Geeks Premier League 2023
Ternary Search
Minimum Distance between Runners before the Race Ends
Last Updated: 23 July 2025
Given two integers N, K and two arrays speed[] and dist[] each of size N, where speed[i] is the speed of the ith runner and dist[i] is the distance which the ith runner is...
read more
Picked
DSA
Geeks Premier League 2023
Ternary Search
Maximize the coins using K moves
Last Updated: 24 February 2024
Given an integer N, the task is to maximize the coins which we can collect using K moves. In one move, we can perform one of the following operations: Type 1: Add N coins...
read more
Picked
DSA
Geeks Premier League 2023
Ternary Search
Minimum Time to travel from Source to Destination
Last Updated: 23 July 2025
Given a source point (x1, y1) and a destination point (x2, y2). Find the minimum time to travel from (x1, y1) to (x2, y2) if the speed is v1 for every point with y 0 and ...
read more
Picked
DSA
Geeks Premier League 2023
Ternary Search
Finding Minimum Time for Workers to Meet at a Point
Last Updated: 23 July 2025
Given N workers standing on a road of infinite length and two arrays point[] and time[] each of size N, such that point[i] is point where the ith worker is standing and ti...
read more
DSA
Algorithms-Divide and Conquer
Algorithms-Searching
Ternary Search
Minimizing Distance Between Two Walkers
Last Updated: 23 July 2025
Given the starting and ending coordinates of path of two persons, the task is to find the minimum distance between the persons at any point of time. The first persons walk...
read more
DSA
Algorithms-Divide and Conquer
Algorithms-Searching
Ternary Search
Minimizing Maximum Absolute Subarray Sums
Last Updated: 23 July 2025
Given an array arr[] of size N, we can choose any real number X which when subtracted from all the elements of the array then the maximum absolute subarray sum among all t...
read more
DSA
Algorithms-Divide and Conquer
Algorithms-Searching
Ternary Search
Minimize the Maximum Distance between runners
Last Updated: 23 July 2025
Given two arrays dist[] and speed[] of size N (number of runners) and a positive integer T (duration of a race), where dist[i], speed[i] indicating the initial distance an...
read more
DSA
Algorithms-Divide and Conquer
Algorithms-Searching
Ternary Search