[PR #1403] [CLOSED] feat: Add Move-To-Front Linear Search implementation #2001

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

📋 Pull Request Information

Original PR: https://github.com/TheAlgorithms/C/pull/1403
Author: @kiranj26
Created: 6/30/2024
Status: Closed

Base: masterHead: move-to-front-linear-search


📝 Commits (3)

  • 3d66262 feat: add stable selection sort algorithm
  • cc1cb0b feat: Add Move-To-Front Linear Search implementation
  • d3471f5 Delete sorting/stable_selection_sort.c

📊 Changes

1 file changed (+108 additions, -0 deletions)

View changed files

searching/move_to_front_linear_search.c (+108 -0)

📄 Description

Description of Change

This pull request adds an implementation of the Move-To-Front Linear Search algorithm. The algorithm searches for an element in an array and, if found, moves it to the front of the array to speed up future searches.

References

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes: Added an efficient and useful variant of the linear search algorithm to the repository.


🔄 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/1403 **Author:** [@kiranj26](https://github.com/kiranj26) **Created:** 6/30/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `move-to-front-linear-search` --- ### 📝 Commits (3) - [`3d66262`](https://github.com/TheAlgorithms/C/commit/3d66262554593aede289e5e0bc9da4172e61ef3c) feat: add stable selection sort algorithm - [`cc1cb0b`](https://github.com/TheAlgorithms/C/commit/cc1cb0b148c0b83a9f253533211aa9bf297d6685) feat: Add Move-To-Front Linear Search implementation - [`d3471f5`](https://github.com/TheAlgorithms/C/commit/d3471f5bdea376e1f2d22074e26d7177c773f881) Delete sorting/stable_selection_sort.c ### 📊 Changes **1 file changed** (+108 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `searching/move_to_front_linear_search.c` (+108 -0) </details> ### 📄 Description #### Description of Change This pull request adds an implementation of the Move-To-Front Linear Search algorithm. The algorithm searches for an element in an array and, if found, moves it to the front of the array to speed up future searches. #### References - https://ics.uci.edu/~dan/pubs/searchsurv.pdf #### Checklist - [x] Added description of change - [x] Added file name matches [File name guidelines](https://github.com/TheAlgorithms/C/blob/master/CONTRIBUTING.md#File-Name-guidelines) - [x] Added tests and example, test must pass - [x] Relevant documentation/comments is changed or added - [x] PR title follows semantic [commit guidelines](https://github.com/TheAlgorithms/C/blob/master/CONTRIBUTING.md#Commit-Guidelines) - [x] Search previous suggestions before making a new one, as yours may be a duplicate. - [x] I acknowledge that all my contributions will be made under the project's license. Notes: Added an efficient and useful variant of the linear search algorithm to the repository. --- <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:27:19 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/C#2001