Werner Zeh uploaded patch set #4 to this change.
commonlib: Add Bubble sort algorithm
Add an implementation for Bubble sort. For now, only integers can be
sorted in an ascending or descending order. It can be later simply
extended to cover other datasets like strings if needed.
The reasons for choosing bubble sort are:
* it is a simple algorithm
* bubble sort is stable, i.e. it does not exchange entries which are not
needed to be sorted as they are already in order
Change-Id: I2c5e0b5685a907243b58ebe6682078272d316bf6
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
---
M src/commonlib/Makefile.inc
M src/commonlib/include/commonlib/helpers.h
A src/commonlib/include/commonlib/sort.h
A src/commonlib/sort.c
4 files changed, 83 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/31544/4
To view, visit change 31544. To unsubscribe, or for help writing mail filters, visit settings.