diff --git a/src/main/java/com/thealgorithms/searches/InterpolationSearch.java b/src/main/java/com/thealgorithms/searches/InterpolationSearch.java index 3ac6be25bf53..d24cc1c774bc 100644 --- a/src/main/java/com/thealgorithms/searches/InterpolationSearch.java +++ b/src/main/java/com/thealgorithms/searches/InterpolationSearch.java @@ -1,3 +1,14 @@ +/** + * Interpolation Search estimates the position of the target value + * based on the distribution of values. + * + * Example: + * Input: [10, 20, 30, 40], target = 30 + * Output: Index = 2 + * + * Time Complexity: O(log log n) (average case) + * Space Complexity: O(1) + */ package com.thealgorithms.searches; /**