Werner Zeh uploaded patch set #2 to this change.

View 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
need 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
A src/commonlib/include/commonlib/sort.h
A src/commonlib/sort.c
3 files changed, 84 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/31544/2

To view, visit change 31544. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2c5e0b5685a907243b58ebe6682078272d316bf6
Gerrit-Change-Number: 31544
Gerrit-PatchSet: 2
Gerrit-Owner: Werner Zeh <werner.zeh@siemens.com>
Gerrit-Reviewer: Aaron Durbin <adurbin@gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth@google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Werner Zeh <werner.zeh@siemens.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Patrick Rudolph <siro@das-labor.org>
Gerrit-MessageType: newpatchset