From 06e99f0b87e8b4c0eb1d5580786fccd175c4ecd2 Mon Sep 17 00:00:00 2001 From: mo khan Date: Sun, 5 Jul 2020 14:51:50 -0600 Subject: Add a description --- src/01/02b/README.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/01') diff --git a/src/01/02b/README.md b/src/01/02b/README.md index b97e061..ab9b6ce 100644 --- a/src/01/02b/README.md +++ b/src/01/02b/README.md @@ -9,6 +9,10 @@ Swap two adjacent elements in a list by adjusting only the links (and not the da ## Description of the Code +The `swap()` function operates in constant time by adjusing the next and previous +pointers for the target nodes to swap. It also updates any pointers for neighbor +nodes that need to be updated as well. + ## Errors and Warnings ```bash -- cgit v1.2.3