Commit c930208

mo khan <mo.khan@gmail.com>
2020-09-27 01:42:02
Merge 02 -> README
1 parent bfcc2fa
Changed files (2)
src/03/02/README.md
@@ -1,46 +0,0 @@
-Illustrate that via AVL single rotation, any binary search tree T1 can be
-transformed into another search tree T2 (with the same items).
-
-Left rotation:
-
-```plaintext
-  (10)                  (20)
-    \                  /    \
-    (20)      ->    (10)    (30)
-      \
-      (30)
-```
-
-Right rotation:
-
-```plaintext
-     (30)            (20)
-     /              /   \
-   (20)     -->   (10)  (30)
-   /
-(10)
-```
-
-Left-Right rotation:
-
-```plaintext
-   (30)         (20)
-   /           /    \
-(10)     -> (10)    (30)
-   \
-   (20)
-```
-
-Right-Left rotation:
-
-```plaintext
-(10)             (20)
-    \            /  \
-    (30)  --> (10)  (30)
-   /
-(20)
-```
-
-Give an algorithm to perform this transformation using O(N log N) rotation on average.
-
-See `./../avl_tree.c`.
src/03/README.md
@@ -49,3 +49,50 @@ Step 6:
       /   \         \
   (10:r) (17:r)      (35:r)
 ```
+
+Illustrate that via AVL single rotation, any binary search tree T1 can be
+transformed into another search tree T2 (with the same items).
+
+Left rotation:
+
+```plaintext
+  (10)                  (20)
+    \                  /    \
+    (20)      ->    (10)    (30)
+      \
+      (30)
+```
+
+Right rotation:
+
+```plaintext
+     (30)            (20)
+     /              /   \
+   (20)     -->   (10)  (30)
+   /
+(10)
+```
+
+Left-Right rotation:
+
+```plaintext
+   (30)         (20)
+   /           /    \
+(10)     -> (10)    (30)
+   \
+   (20)
+```
+
+Right-Left rotation:
+
+```plaintext
+(10)             (20)
+    \            /  \
+    (30)  --> (10)  (30)
+   /
+(20)
+```
+
+Give an algorithm to perform this transformation using O(N log N) rotation on average.
+
+See `./avl_tree.c`.