Skip to content

Commit

Permalink
Merge branch 'feature/ternary_search_implementation'
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramy-Badr-Ahmed committed Sep 28, 2024
2 parents 711ff42 + e127b6e commit a607053
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
7 changes: 7 additions & 0 deletions examples/searches/example_ternary_search_function_based.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
!> Example Program: Function-based Ternary Search for Minimum and Maximum
!!
!! Created by: Ramy-Badr-Ahmed (https://github.com/Ramy-Badr-Ahmed)
!! in Pull Request: #24
!! https://github.com/TheAlgorithms/Fortran/pull/24
!!
!! Please mention me (@Ramy-Badr-Ahmed) in any issue or pull request
!! addressing bugs/corrections to this file. Thank you!
!!
!! This program demonstrates how to use the function-based ternary search algorithm
!! from the `ternary_search` module to find the minimum and maximum of unimodal functions.

Expand Down
10 changes: 9 additions & 1 deletion modules/searches/ternary_search_module.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
!> Ternary Search Algorithm Module
!!
!! This module implements two types of ternary search algorithms: array-based and function-based.
!! This module implements two types of ternary search algorithm: array-based and function-based.
!!
!! Created by: Ramy-Badr-Ahmed (https://github.com/Ramy-Badr-Ahmed)
!! in Pull Request: #24
!! https://github.com/TheAlgorithms/Fortran/pull/24
!!
!! Please mention me (@Ramy-Badr-Ahmed) in any issue or pull request
!! addressing bugs/corrections to this file. Thank you!
!!
!! The array-based ternary search is used to find a target element within a sorted array, while the function-based
!! approach is used to find the minimum or maximum of a unimodal function.
!!
Expand Down

0 comments on commit a607053

Please sign in to comment.