[PR #120] [MERGED] Update interpolation_search.c #350

Open
opened 2026-01-29 15:11:55 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/TheAlgorithms/C/pull/120
Author: @AkshayAnvi
Created: 3/13/2018
Status: Merged
Merged: 3/15/2018
Merged by: @christianbender

Base: masterHead: patch-1


📝 Commits (1)

  • 8d24003 Update interpolation_search.c

📊 Changes

1 file changed (+13 additions, -22 deletions)

View changed files

📝 Searches/interpolation_search.c (+13 -22)

📄 Description

  1. Easy logic built
  2. error minimized: as array is increasing in above example it might not always be increasing.just replace 47 by 2 then run above program it will give an incorrect ans. but in improvised case it is minimized.
  3. we are scanning input from user so, more saturated
  4. 'position' is more reliable than 'index'.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/TheAlgorithms/C/pull/120 **Author:** [@AkshayAnvi](https://github.com/AkshayAnvi) **Created:** 3/13/2018 **Status:** ✅ Merged **Merged:** 3/15/2018 **Merged by:** [@christianbender](https://github.com/christianbender) **Base:** `master` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`8d24003`](https://github.com/TheAlgorithms/C/commit/8d240037b30c45f3596f31d2730028fb0f8c2814) Update interpolation_search.c ### 📊 Changes **1 file changed** (+13 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `Searches/interpolation_search.c` (+13 -22) </details> ### 📄 Description 1) Easy logic built 2) error minimized: as array is increasing in above example it might not always be increasing.just replace 47 by 2 then run above program it will give an incorrect ans. but in improvised case it is minimized. 3) we are scanning input from user so, more saturated 4) 'position' is more reliable than 'index'. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 15:11:55 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/C#350