diff --git a/.DS_Store b/.DS_Store index aa59c02..fcb6a9c 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_align.scssc b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_align.scssc new file mode 100644 index 0000000..f704b13 Binary files /dev/null and b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_align.scssc differ diff --git a/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_background.scssc b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_background.scssc new file mode 100644 index 0000000..89f1da2 Binary files /dev/null and b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_background.scssc differ diff --git a/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_borders.scssc b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_borders.scssc new file mode 100644 index 0000000..9e24558 Binary files /dev/null and b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_borders.scssc differ diff --git a/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_clearfix.scssc b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_clearfix.scssc new file mode 100644 index 0000000..7c1de27 Binary files /dev/null and b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_clearfix.scssc differ diff --git a/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_display.scssc b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_display.scssc new file mode 100644 index 0000000..628a04c Binary files /dev/null and b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_display.scssc differ diff --git a/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_embed.scssc b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_embed.scssc new file mode 100644 index 0000000..0f9e764 Binary files /dev/null and b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_embed.scssc differ diff --git a/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_flex.scssc b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_flex.scssc new file mode 100644 index 0000000..5467442 Binary files /dev/null and b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_flex.scssc differ diff --git a/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_float.scssc b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_float.scssc new file mode 100644 index 0000000..a44af04 Binary files /dev/null and b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_float.scssc differ diff --git a/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_overflow.scssc b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_overflow.scssc new file mode 100644 index 0000000..71eab03 Binary files /dev/null and b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_overflow.scssc differ diff --git a/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_position.scssc b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_position.scssc new file mode 100644 index 0000000..49b9774 Binary files /dev/null and b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_position.scssc differ diff --git a/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_screenreaders.scssc b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_screenreaders.scssc new file mode 100644 index 0000000..59d05e4 Binary files /dev/null and b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_screenreaders.scssc differ diff --git a/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_shadows.scssc b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_shadows.scssc new file mode 100644 index 0000000..22b3a65 Binary files /dev/null and b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_shadows.scssc differ diff --git a/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_sizing.scssc b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_sizing.scssc new file mode 100644 index 0000000..d2fa2bd Binary files /dev/null and b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_sizing.scssc differ diff --git a/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_spacing.scssc b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_spacing.scssc new file mode 100644 index 0000000..a290fdd Binary files /dev/null and b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_spacing.scssc differ diff --git a/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_text.scssc b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_text.scssc new file mode 100644 index 0000000..f99ab1c Binary files /dev/null and b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_text.scssc differ diff --git a/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_visibility.scssc b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_visibility.scssc new file mode 100644 index 0000000..97ceeab Binary files /dev/null and b/.sass-cache/6f2f901eed35f8ece3ca34598768ad6c73458e00/_visibility.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_alert.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_alert.scssc new file mode 100644 index 0000000..caaee99 Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_alert.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_background-variant.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_background-variant.scssc new file mode 100644 index 0000000..0aab084 Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_background-variant.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_badge.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_badge.scssc new file mode 100644 index 0000000..197e5ad Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_badge.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_border-radius.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_border-radius.scssc new file mode 100644 index 0000000..4f29d33 Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_border-radius.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_box-shadow.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_box-shadow.scssc new file mode 100644 index 0000000..b58c5ca Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_box-shadow.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_breakpoints.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_breakpoints.scssc new file mode 100644 index 0000000..ee2a691 Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_breakpoints.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_buttons.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_buttons.scssc new file mode 100644 index 0000000..dddcd6c Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_buttons.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_caret.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_caret.scssc new file mode 100644 index 0000000..6be2624 Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_caret.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_clearfix.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_clearfix.scssc new file mode 100644 index 0000000..d65ea26 Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_clearfix.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_float.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_float.scssc new file mode 100644 index 0000000..8ef4202 Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_float.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_forms.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_forms.scssc new file mode 100644 index 0000000..8be9acc Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_forms.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_gradients.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_gradients.scssc new file mode 100644 index 0000000..e7dd43c Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_gradients.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_grid-framework.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_grid-framework.scssc new file mode 100644 index 0000000..cb189bb Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_grid-framework.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_grid.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_grid.scssc new file mode 100644 index 0000000..2e760f2 Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_grid.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_hover.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_hover.scssc new file mode 100644 index 0000000..fe2f04c Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_hover.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_image.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_image.scssc new file mode 100644 index 0000000..f957afc Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_image.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_list-group.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_list-group.scssc new file mode 100644 index 0000000..af2dde4 Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_list-group.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_lists.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_lists.scssc new file mode 100644 index 0000000..48e8a1d Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_lists.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_nav-divider.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_nav-divider.scssc new file mode 100644 index 0000000..746d407 Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_nav-divider.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_pagination.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_pagination.scssc new file mode 100644 index 0000000..b2b4be4 Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_pagination.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_reset-text.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_reset-text.scssc new file mode 100644 index 0000000..e3896bd Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_reset-text.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_resize.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_resize.scssc new file mode 100644 index 0000000..8c76c81 Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_resize.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_screen-reader.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_screen-reader.scssc new file mode 100644 index 0000000..f6dbe0c Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_screen-reader.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_size.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_size.scssc new file mode 100644 index 0000000..4658ab4 Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_size.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_table-row.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_table-row.scssc new file mode 100644 index 0000000..5407df7 Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_table-row.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_text-emphasis.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_text-emphasis.scssc new file mode 100644 index 0000000..cc9fe93 Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_text-emphasis.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_text-hide.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_text-hide.scssc new file mode 100644 index 0000000..c867dd4 Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_text-hide.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_text-truncate.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_text-truncate.scssc new file mode 100644 index 0000000..ba25b9e Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_text-truncate.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_transition.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_transition.scssc new file mode 100644 index 0000000..793fb2a Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_transition.scssc differ diff --git a/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_visibility.scssc b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_visibility.scssc new file mode 100644 index 0000000..170fede Binary files /dev/null and b/.sass-cache/854d2f77dfff1a8f231da71ac3dcf4c331f6a8d2/_visibility.scssc differ diff --git a/.sass-cache/b17002ba4d5d55e3c0c937341e04322a4dc4137b/_bootstrap-4-jekyll.scssc b/.sass-cache/b17002ba4d5d55e3c0c937341e04322a4dc4137b/_bootstrap-4-jekyll.scssc new file mode 100644 index 0000000..de2c71c Binary files /dev/null and b/.sass-cache/b17002ba4d5d55e3c0c937341e04322a4dc4137b/_bootstrap-4-jekyll.scssc differ diff --git a/.sass-cache/e0de38d5d8b43b3ee2d92f21e3f5a8ee1877e7b4/_bootstrap_customization.scssc b/.sass-cache/e0de38d5d8b43b3ee2d92f21e3f5a8ee1877e7b4/_bootstrap_customization.scssc new file mode 100644 index 0000000..07caac4 Binary files /dev/null and b/.sass-cache/e0de38d5d8b43b3ee2d92f21e3f5a8ee1877e7b4/_bootstrap_customization.scssc differ diff --git a/.sass-cache/e0de38d5d8b43b3ee2d92f21e3f5a8ee1877e7b4/_syntax-highlighting.scssc b/.sass-cache/e0de38d5d8b43b3ee2d92f21e3f5a8ee1877e7b4/_syntax-highlighting.scssc new file mode 100644 index 0000000..80e146d Binary files /dev/null and b/.sass-cache/e0de38d5d8b43b3ee2d92f21e3f5a8ee1877e7b4/_syntax-highlighting.scssc differ diff --git a/.sass-cache/e0de38d5d8b43b3ee2d92f21e3f5a8ee1877e7b4/course-specific-first.scssc b/.sass-cache/e0de38d5d8b43b3ee2d92f21e3f5a8ee1877e7b4/course-specific-first.scssc new file mode 100644 index 0000000..19e8717 Binary files /dev/null and b/.sass-cache/e0de38d5d8b43b3ee2d92f21e3f5a8ee1877e7b4/course-specific-first.scssc differ diff --git a/.sass-cache/e0de38d5d8b43b3ee2d92f21e3f5a8ee1877e7b4/jekyll-github.scssc b/.sass-cache/e0de38d5d8b43b3ee2d92f21e3f5a8ee1877e7b4/jekyll-github.scssc new file mode 100644 index 0000000..f8853e2 Binary files /dev/null and b/.sass-cache/e0de38d5d8b43b3ee2d92f21e3f5a8ee1877e7b4/jekyll-github.scssc differ diff --git a/.sass-cache/e0de38d5d8b43b3ee2d92f21e3f5a8ee1877e7b4/site-print.scssc b/.sass-cache/e0de38d5d8b43b3ee2d92f21e3f5a8ee1877e7b4/site-print.scssc new file mode 100644 index 0000000..ba5165b Binary files /dev/null and b/.sass-cache/e0de38d5d8b43b3ee2d92f21e3f5a8ee1877e7b4/site-print.scssc differ diff --git a/.sass-cache/e0de38d5d8b43b3ee2d92f21e3f5a8ee1877e7b4/site.scssc b/.sass-cache/e0de38d5d8b43b3ee2d92f21e3f5a8ee1877e7b4/site.scssc new file mode 100644 index 0000000..b5a77a7 Binary files /dev/null and b/.sass-cache/e0de38d5d8b43b3ee2d92f21e3f5a8ee1877e7b4/site.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_alert.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_alert.scssc new file mode 100644 index 0000000..f9704a9 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_alert.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_badge.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_badge.scssc new file mode 100644 index 0000000..30857b6 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_badge.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_breadcrumb.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_breadcrumb.scssc new file mode 100644 index 0000000..db1e632 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_breadcrumb.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_button-group.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_button-group.scssc new file mode 100644 index 0000000..e6b74dc Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_button-group.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_buttons.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_buttons.scssc new file mode 100644 index 0000000..aa9811a Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_buttons.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_card.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_card.scssc new file mode 100644 index 0000000..d4f3ae5 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_card.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_carousel.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_carousel.scssc new file mode 100644 index 0000000..7f5aa75 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_carousel.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_close.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_close.scssc new file mode 100644 index 0000000..82b756e Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_close.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_code.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_code.scssc new file mode 100644 index 0000000..9ce59b2 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_code.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_custom-forms.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_custom-forms.scssc new file mode 100644 index 0000000..6aa34cd Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_custom-forms.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_dropdown.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_dropdown.scssc new file mode 100644 index 0000000..4606199 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_dropdown.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_forms.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_forms.scssc new file mode 100644 index 0000000..a66be12 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_forms.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_functions.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_functions.scssc new file mode 100644 index 0000000..d90aae2 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_functions.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_grid.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_grid.scssc new file mode 100644 index 0000000..eb6ca21 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_grid.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_images.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_images.scssc new file mode 100644 index 0000000..d32b43f Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_images.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_input-group.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_input-group.scssc new file mode 100644 index 0000000..6eff0c0 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_input-group.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_jumbotron.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_jumbotron.scssc new file mode 100644 index 0000000..5e3a955 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_jumbotron.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_list-group.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_list-group.scssc new file mode 100644 index 0000000..62664b8 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_list-group.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_media.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_media.scssc new file mode 100644 index 0000000..8949fe1 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_media.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_mixins.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_mixins.scssc new file mode 100644 index 0000000..4acccdb Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_mixins.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_modal.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_modal.scssc new file mode 100644 index 0000000..05bcc42 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_modal.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_nav.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_nav.scssc new file mode 100644 index 0000000..98f1028 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_nav.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_navbar.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_navbar.scssc new file mode 100644 index 0000000..03a0ec5 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_navbar.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_pagination.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_pagination.scssc new file mode 100644 index 0000000..cc6ec16 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_pagination.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_popover.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_popover.scssc new file mode 100644 index 0000000..f1d4d23 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_popover.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_print.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_print.scssc new file mode 100644 index 0000000..e6a0ed2 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_print.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_progress.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_progress.scssc new file mode 100644 index 0000000..2e9a0b1 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_progress.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_reboot.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_reboot.scssc new file mode 100644 index 0000000..e638551 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_reboot.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_root.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_root.scssc new file mode 100644 index 0000000..32bde6f Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_root.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_spinners.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_spinners.scssc new file mode 100644 index 0000000..a3f7646 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_spinners.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_tables.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_tables.scssc new file mode 100644 index 0000000..0c68143 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_tables.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_toasts.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_toasts.scssc new file mode 100644 index 0000000..bfec938 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_toasts.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_tooltip.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_tooltip.scssc new file mode 100644 index 0000000..c86bcb1 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_tooltip.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_transitions.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_transitions.scssc new file mode 100644 index 0000000..12f9025 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_transitions.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_type.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_type.scssc new file mode 100644 index 0000000..8120347 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_type.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_utilities.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_utilities.scssc new file mode 100644 index 0000000..2b33955 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_utilities.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_variables.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_variables.scssc new file mode 100644 index 0000000..febd911 Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/_variables.scssc differ diff --git a/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/bootstrap.scssc b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/bootstrap.scssc new file mode 100644 index 0000000..efc841e Binary files /dev/null and b/.sass-cache/e2c1317feb47c68d82a722be0ce022e810d5d9f5/bootstrap.scssc differ diff --git a/_lab/lab03.md b/_lab/lab03.md new file mode 100644 index 0000000..4bb0c11 --- /dev/null +++ b/_lab/lab03.md @@ -0,0 +1,206 @@ +--- +layout: lab +num: lab03 +ready: true +desc: "Binary Search Tree" +assigned: 2023-10-26 9:00:00.00-8 +due: 2023-11-01 23:59:00.00-8 +--- + + +# Goals for this lab + +By the time you have completed this lab, you should be able to + +* Know how to navigate a binary tree data structure +* Implement recursive functions for binary trees +* Implement binary search tree functions + +## Collaboration policy +This lab must be done solo + +## Academic Integrity +All work submitted for this lab should be your own. If you are using any hints from a previous offering of this course that was posted publicly by a CS24 instructor, you must cite your source. + +## Step by Step Instructions + +## Step 0: Create a git repo and get the starter code +Refer to lab01 for instructions on how to set up a GitHub repository and pull the starter code for this lab. Here is the link for this lab's starter code: < + + +## Step 0a: Get the starter code and create a Makefile + +There are three required files to copy from the class account this week. After pulling the starter code, you should be able to type the command ```ls``` and see the following files in your directory. +``` +-bash-4.3$ ls +intbst.cpp intbst.h testbst.cpp +``` + +**The first thing you should do is create a simple Makefile that compiles intbst.cpp and testbst.cpp ** + +A binary search tree class for integers, class IntBST is defined in intbst.h - please study this file for details of the class's features: + +- In Step 1, the constructor, destructor, clear and insert methods are to be implemented in intbst.cpp. Notice the insert method will return false to indicate an attempt to insert a duplicate value; otherwise it inserts the value and returns true. +- In Step 2, you will implement the three print methods, pre-order, in-order, and post-order. +- In Step 3 you will implement the sum, count, contains, and getNodeFor methods. +- In Step 4, you will implement the predecessor, successor, and remove methods. Step 4 will likely take you the most time BY FAR, so plan accordingly. +The binary tree node structure is defined in the private area. The only instance variable is a node pointer, to point at the root node of the tree or at 0 if the tree is empty. +Several utility functions are declared in the private area too. These functions can be recursive (by virtue of their Node* parameters), and the public methods can use them. See how the destructor might use clear, for example, and how the insert method would use the overloaded version of insert, each by passing the root pointer to the corresponding utility function. Also take note of the definition of getNodeFor, which will be useful in several of the functions you need to implement. Consider implementing this function immediately after the print functions, and think about where you can reuse it. + +# Step 1 - Constructor, Insert, Destructor, Clear + +Use an editor to make the following changes to intbst.cpp - do not change any of the other files. +First and foremost: fix the comment at the top to show your name and the date. + +Assuming you successfuly compiled in step 0a, you should be able to run testbst now: +``` +-bash-4.3$ ./testbst +Choice of tests: + 0. all tests + 1. just printInOrder + 2. just printPostOrder + 3. just sum + 4. just count + 5. just contains +Enter choice: +0 +BST: + pre-order: + in-order: + post-order: + sum: 0 + count: 0 + contains 64? N + contains 4? N + contains 16? N + contains 128? N + contains 17? N + contains 512? N + . . . +Empty BST: + pre-order: + in-order: + post-order: + sum: 0 + count: 0 + contains 16? N + +``` + +As you can see, none of the functions do anything at the moment, but you can start by implementing the constructor and insert methods since these will server as the foundation for future testing. +* Constructor: Even though the IntBST class may have many member functions associated with it, its only member variable is a Node* type called root. +* Insert: Think about the properties of a binary search tree and traverse the tree accordingly. Note there is a private helper function for insert declared in intbst.h + +Next, the destructor function, which uses a helper function called clear. +* Clear: this method should remove all nodes in the binary search tree without creating memory leaks. +* Destructor: When the object's scope ends, the destructor should take care of any memory allocation during its lifetime. + + +# Step 2: Implement pre-order, in-order, and post-order binary tree printing + +Now that we have the foundations for creating an object of IntBST, scroll to the print functions. Inside IntBST.h, you will notice there are both public and private implementations of the functions printPreOrder, printInOrder and printPostOrder. The private functions will be used as helpers to their public counterparts. Your job in this step is to implement all of them, public and private. +After you finish, save and then test your print implementations: compile and execute testbst again, choosing either all tests or just one of your print functions to test. +Here are the correct results (abbreviated to show just the print orders): + +BST: + + pre-order: 64 8 4 32 16 128 512 256 + + in-order: 4 8 16 32 64 128 256 512 + + post-order: 4 16 32 8 256 512 128 64 + +By the way, you should be able to draw the tree now, both by tracing the order of the inserts, or by interpreting the three orders above. Take a minute to try that now on a piece of scratch paper since it may be very helpful when implementing the remaining functions. + +# Step 3: Implement three more binary search tree functions + +First: switch roles between pilot and navigator if you did not already do that. + +You may do these tasks in any order. Check the results of each part as you complete it. + +- Implement the helper function getNodeFor() - this function will be helpful for future functions. +- Implement the helper function for sum() - notice the public method just returns the result of the helper function. We suggest you use recursion to do so. Think about these questions before starting to code: What's the base case? What should be returned in the base case? What should be returned in the general (recursive) case? +- Implement the helper function for count() - this is very similar to the sum() function. +- Implement the public contains method, either recursively or iteratively - both are about the same level of difficulty in this case. If you decide to use recursion, you can use getNodeFor() in your implementation of contains(). You won't need this utility function to solve the problem iteratively. In either case, remember the tree is a binary search tree, and so your solution should run in O(log n) time. + +Here are the results of all tests from our solution - you should verify that your results match: +``` +BST: + pre-order: 64 8 4 32 16 128 512 256 + in-order: 4 8 16 32 64 128 256 512 + post-order: 4 16 32 8 256 512 128 64 + sum: 1020 + count: 8 + contains 64? Y + contains 4? Y + contains 16? Y + contains 128? Y + contains 17? N + contains 512? Y + . . . +Empty BST: + pre-order: + in-order: + post-order: + sum: 0 + count: 0 + contains 16? N +``` + +Be aware, however, that more rigorous testing will be done when your work is submitted (a different program is used for testing your functions, some with random data). + +# Step 4: Implement predecessor, successor, and remove + +Your final task for this lab is to implement getPredecessor(), getSuccessor(), and remove(). The predecessor of a value is the next lowest value, while the successor is the next highest. Note that these functions should be implemented using the inherent structure of the binary tree, not by an exhaustive search for the next value. It will very likely be helpful to draw out the tree (the pre-order print can help you with this) when understanding how to implement getPredecessor() and getSuccessor(). If the element passed to the function is the first (for predecessor) or last (for successor) element in the tree, the function should return 0. It should also return 0 if the value is not present in the tree. Both of these functions will likely be harder to implement than any of the prior functions in this lab. However, correct implementations of getPredecessor() and getSuccessor look VERY similar, so you will likely be able to reuse a lot of your logic. + +Finally, move on to remove(), which is likely the hardest algorithm you will be asked to implement this quarter. It is not excessively complicated in principle, but getting it completely right can take a while. Consider switching off pilot and navigator as you are debugging your implementation. You will probably find it helpful to use either getPredecessor() or getSuccessor() in remove(). You can also use remove() inside of itself, though it should NOT be a recursive function--the difference being that only one additional call of remove() should EVER occur. As with predecessors and successors, drawing the tree will be very helpful. + +A correct implementation of all functions should produce the following output from testbst when selecting option 0: + +``` +BST: + pre-order: 64 8 4 32 16 128 512 256 + in-order: 4 8 16 32 64 128 256 512 + post-order: 4 16 32 8 256 512 128 64 + sum: 1020 + count: 8 + contains 64? Y + contains 4? Y + contains 16? Y + contains 128? Y + contains 17? N + contains 512? Y + predecessor of 64 is: 32 + predecessor of 512 is: 256 + predecessor of 4 is: 0 + successor of 64 is: 128 + successor of 512 is: 0 + successor of 4 is: 8 + removing 4 + removing 64 + removing 128 + contains 64? N + contains 4? N + contains 16? Y + contains 128? N + contains 17? N + contains 512? Y + in-order: 8 16 32 256 512 +Empty BST: + pre-order: + in-order: + post-order: + sum: 0 + count: 0 + contains 16? N +``` +# Step 5: Create a testbench in a file test_intbst.cpp + +In a file named test_intbst.cpp, include code to test all the functions that you implemented in intbst.cpp. Make sure that this file is compilable. + +# Step 6: Submit your revised intbst.cpp, test_intbst.cpp and intbst.h + +You are allowed to modify intbst.h, though you should not need to, so submit both intbst.cpp and intbst.h to Gradescope for a grade out of 100. + + + diff --git a/_lectures/CS24_Lecture6_ann.pdf b/_lectures/CS24_Lecture6_ann.pdf new file mode 100644 index 0000000..1439af4 Binary files /dev/null and b/_lectures/CS24_Lecture6_ann.pdf differ diff --git a/_lectures/CS24_Lecture7.pdf b/_lectures/CS24_Lecture7.pdf index 5b26efd..e7304bc 100644 Binary files a/_lectures/CS24_Lecture7.pdf and b/_lectures/CS24_Lecture7.pdf differ diff --git a/_lectures/CS24_Lecture7_ann.pdf b/_lectures/CS24_Lecture7_ann.pdf new file mode 100644 index 0000000..992c591 Binary files /dev/null and b/_lectures/CS24_Lecture7_ann.pdf differ diff --git a/_lectures/CS24_Lecture8.pdf b/_lectures/CS24_Lecture8.pdf new file mode 100644 index 0000000..8fd4b0a Binary files /dev/null and b/_lectures/CS24_Lecture8.pdf differ diff --git a/_lectures/lect06.md b/_lectures/lect06.md index d0d393f..74f2c53 100644 --- a/_lectures/lect06.md +++ b/_lectures/lect06.md @@ -5,7 +5,7 @@ desc: "Tree traversals and BST operations " ready: true pdfurl: /lectures/CS24_Lecture6.pdf annotatedpdfurl: /lectures/CS24_Lecture6_ann.pdf -annotatedready: false +annotatedready: true --- # Code from lecture diff --git a/_lectures/lect07.md b/_lectures/lect07.md index 0ebb84b..4ca2a3b 100644 --- a/_lectures/lect07.md +++ b/_lectures/lect07.md @@ -5,7 +5,7 @@ desc: "BST wrap up + intro to running time analysis" ready: true pdfurl: /lectures/CS24_Lecture7.pdf annotatedpdfurl: /lectures/CS24_Lecture7_ann.pdf -annotatedready: false +annotatedready: true --- # Code from lecture [{{site.lect_repo}}/tree/main/{{page.num}}]({{site.lect_repo}}/tree/main/{{page.num}}) diff --git a/_lectures/lect08.md b/_lectures/lect08.md new file mode 100644 index 0000000..b152463 --- /dev/null +++ b/_lectures/lect08.md @@ -0,0 +1,16 @@ +--- +lecture_date: 2023-10-25 +num: "lect08" +desc: "Big-O running time analysis" +ready: true +pdfurl: /lectures/CS24_Lecture8.pdf +annotatedpdfurl: /lectures/CS24_Lecture8_ann.pdf +annotatedready: false +--- +# Code from lecture +[{{site.lect_repo}}/tree/main/{{page.num}}]({{site.lect_repo}}/tree/main/{{page.num}}) + +# Topics +* We'll wrap up our discussion of BSTs + - Remaining BST operations (predecessor, successor, delete) +* Discuss and motivate runtime analysis \ No newline at end of file diff --git a/_site/assets/js/calendar.js b/_site/assets/js/calendar.js index 1789001..7b6d6d8 100644 --- a/_site/assets/js/calendar.js +++ b/_site/assets/js/calendar.js @@ -54,6 +54,16 @@ var dates = [{ "ready" : "true", "desc" : "Implementing a linked list- OOP style", +} +,{ + "type" : "lab", + "url" : "/f23/lab/lab03/", + "num" : "lab03", + "assigned" : "2023-10-26 09:00:00 -0800", + "due" : "2023-11-01 23:59:00 -0800", + "ready" : "true", + "desc" : "Binary Search Tree", + } ,{ "type" : "lectures", @@ -126,6 +136,30 @@ var dates = [{ "date" : "2023-10-18", +} +,{ + "type" : "lectures", + "url" : "/f23/lectures/lect07/", + "num" : "lect07", + + + "ready" : "true", + "desc" : "BST wrap up + intro to running time analysis", + + "date" : "2023-10-23", + +} +,{ + "type" : "lectures", + "url" : "/f23/lectures/lect08/", + "num" : "lect08", + + + "ready" : "true", + "desc" : "Big-O running time analysis", + + "date" : "2023-10-25", + } ,]; diff --git a/_site/assets/js/scrape.js b/_site/assets/js/scrape.js index a5b51a2..0b82836 100644 --- a/_site/assets/js/scrape.js +++ b/_site/assets/js/scrape.js @@ -83,6 +83,12 @@ var DEBUGGING_ONLY = { "num" : "lab02", }, + { + "collection" : "lab", + "url" : "/lab/lab03/", + "num" : "lab03", + }, + ] }, @@ -127,6 +133,18 @@ var DEBUGGING_ONLY = { "num" : "lect06", }, + { + "collection" : "lectures", + "url" : "/lectures/lect07/", + "num" : "lect07", + }, + + { + "collection" : "lectures", + "url" : "/lectures/lect08/", + "num" : "lect08", + }, + ] }, diff --git a/_site/index.html b/_site/index.html index d04a3f0..80880ed 100644 --- a/_site/index.html +++ b/_site/index.html @@ -354,7 +354,33 @@

CS 24 F23: Problem Solving 2023-10-18 lect06 true - Tree traversals and BST operations  (slides) + Tree traversals and BST operations  (slides) (annotated slides) + + + + + + + + + + 2023-10-23 + lect07 + true + BST wrap up + intro to running time analysis (slides) (annotated slides) + + + + + + + + + + 2023-10-25 + lect08 + true + Big-O running time analysis (slides) @@ -426,6 +452,19 @@

CS 24 F23: Problem Solving + + + lab03 + true + Binary Search Tree + Thu 10/26 09:00AM + Wed 11/01 11:59PM + + + + + + diff --git a/_site/lab/lab03/index.html b/_site/lab/lab03/index.html new file mode 100644 index 0000000..4a4fbd3 --- /dev/null +++ b/_site/lab/lab03/index.html @@ -0,0 +1,485 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + lab03 - Binary Search Tree - + + +
+ + + + + + + + + + + + +
+

lab03 : Binary Search Tree

+ + + + + + + + + + + + + + + + + + + + + + +
numready?descriptionassigneddue
lab03trueBinary Search TreeThu 10/26 09:00AMWed 11/01 11:59PM
+

Goals for this lab

+ +

By the time you have completed this lab, you should be able to

+ +
    +
  • Know how to navigate a binary tree data structure
  • +
  • Implement recursive functions for binary trees
  • +
  • Implement binary search tree functions
  • +
+ +

Collaboration policy

+

This lab must be done solo

+ +

Academic Integrity

+

All work submitted for this lab should be your own. If you are using any hints from a previous offering of this course that was posted publicly by a CS24 instructor, you must cite your source.

+ +

Step by Step Instructions

+ +

Step 0: Create a git repo and get the starter code

+

Refer to lab01 for instructions on how to set up a GitHub repository and pull the starter code for this lab. Here is the link for this lab’s starter code: < https://github.com/ucsb-cs24-f23/STARTER-lab03

+ +

Step 0a: Get the starter code and create a Makefile

+ +

There are three required files to copy from the class account this week. After pulling the starter code, you should be able to type the command ls and see the following files in your directory.

+
-bash-4.3$ ls
+intbst.cpp  intbst.h  testbst.cpp
+
+ +

**The first thing you should do is create a simple Makefile that compiles intbst.cpp and testbst.cpp **

+ +

A binary search tree class for integers, class IntBST is defined in intbst.h - please study this file for details of the class’s features:

+ +
    +
  • In Step 1, the constructor, destructor, clear and insert methods are to be implemented in intbst.cpp. Notice the insert method will return false to indicate an attempt to insert a duplicate value; otherwise it inserts the value and returns true.
  • +
  • In Step 2, you will implement the three print methods, pre-order, in-order, and post-order.
  • +
  • In Step 3 you will implement the sum, count, contains, and getNodeFor methods.
  • +
  • In Step 4, you will implement the predecessor, successor, and remove methods. Step 4 will likely take you the most time BY FAR, so plan accordingly. +The binary tree node structure is defined in the private area. The only instance variable is a node pointer, to point at the root node of the tree or at 0 if the tree is empty. +Several utility functions are declared in the private area too. These functions can be recursive (by virtue of their Node* parameters), and the public methods can use them. See how the destructor might use clear, for example, and how the insert method would use the overloaded version of insert, each by passing the root pointer to the corresponding utility function. Also take note of the definition of getNodeFor, which will be useful in several of the functions you need to implement. Consider implementing this function immediately after the print functions, and think about where you can reuse it.
  • +
+ +

Step 1 - Constructor, Insert, Destructor, Clear

+ +

Use an editor to make the following changes to intbst.cpp - do not change any of the other files. +First and foremost: fix the comment at the top to show your name and the date.

+ +

Assuming you successfuly compiled in step 0a, you should be able to run testbst now:

+
-bash-4.3$ ./testbst
+Choice of tests:
+  0. all tests
+  1. just printInOrder
+  2. just printPostOrder
+  3. just sum
+  4. just count
+  5. just contains
+Enter choice:
+0
+BST:
+  pre-order:
+  in-order:
+  post-order:
+  sum: 0
+  count: 0
+  contains 64? N
+  contains 4? N
+  contains 16? N
+  contains 128? N
+  contains 17? N
+  contains 512? N
+  . . .
+Empty BST:
+  pre-order:
+  in-order:
+  post-order:
+  sum: 0
+  count: 0
+  contains 16? N
+
+
+ +

As you can see, none of the functions do anything at the moment, but you can start by implementing the constructor and insert methods since these will server as the foundation for future testing.

+
    +
  • Constructor: Even though the IntBST class may have many member functions associated with it, its only member variable is a Node* type called root.
  • +
  • Insert: Think about the properties of a binary search tree and traverse the tree accordingly. Note there is a private helper function for insert declared in intbst.h
  • +
+ +

Next, the destructor function, which uses a helper function called clear.

+
    +
  • Clear: this method should remove all nodes in the binary search tree without creating memory leaks.
  • +
  • Destructor: When the object’s scope ends, the destructor should take care of any memory allocation during its lifetime.
  • +
+ +

Step 2: Implement pre-order, in-order, and post-order binary tree printing

+ +

Now that we have the foundations for creating an object of IntBST, scroll to the print functions. Inside IntBST.h, you will notice there are both public and private implementations of the functions printPreOrder, printInOrder and printPostOrder. The private functions will be used as helpers to their public counterparts. Your job in this step is to implement all of them, public and private. +After you finish, save and then test your print implementations: compile and execute testbst again, choosing either all tests or just one of your print functions to test. +Here are the correct results (abbreviated to show just the print orders):

+ +

BST:

+ +

pre-order: 64 8 4 32 16 128 512 256

+ +

in-order: 4 8 16 32 64 128 256 512

+ +

post-order: 4 16 32 8 256 512 128 64

+ +

By the way, you should be able to draw the tree now, both by tracing the order of the inserts, or by interpreting the three orders above. Take a minute to try that now on a piece of scratch paper since it may be very helpful when implementing the remaining functions.

+ +

Step 3: Implement three more binary search tree functions

+ +

First: switch roles between pilot and navigator if you did not already do that.

+ +

You may do these tasks in any order. Check the results of each part as you complete it.

+ +
    +
  • Implement the helper function getNodeFor() - this function will be helpful for future functions.
  • +
  • Implement the helper function for sum() - notice the public method just returns the result of the helper function. We suggest you use recursion to do so. Think about these questions before starting to code: What’s the base case? What should be returned in the base case? What should be returned in the general (recursive) case?
  • +
  • Implement the helper function for count() - this is very similar to the sum() function.
  • +
  • Implement the public contains method, either recursively or iteratively - both are about the same level of difficulty in this case. If you decide to use recursion, you can use getNodeFor() in your implementation of contains(). You won’t need this utility function to solve the problem iteratively. In either case, remember the tree is a binary search tree, and so your solution should run in O(log n) time.
  • +
+ +

Here are the results of all tests from our solution - you should verify that your results match:

+
BST:
+  pre-order: 64 8 4 32 16 128 512 256
+  in-order: 4 8 16 32 64 128 256 512
+  post-order: 4 16 32 8 256 512 128 64
+  sum: 1020
+  count: 8
+  contains 64? Y
+  contains 4? Y
+  contains 16? Y
+  contains 128? Y
+  contains 17? N
+  contains 512? Y
+  . . .
+Empty BST:
+  pre-order:
+  in-order:
+  post-order:
+  sum: 0
+  count: 0
+  contains 16? N
+
+ +

Be aware, however, that more rigorous testing will be done when your work is submitted (a different program is used for testing your functions, some with random data).

+ +

Step 4: Implement predecessor, successor, and remove

+ +

Your final task for this lab is to implement getPredecessor(), getSuccessor(), and remove(). The predecessor of a value is the next lowest value, while the successor is the next highest. Note that these functions should be implemented using the inherent structure of the binary tree, not by an exhaustive search for the next value. It will very likely be helpful to draw out the tree (the pre-order print can help you with this) when understanding how to implement getPredecessor() and getSuccessor(). If the element passed to the function is the first (for predecessor) or last (for successor) element in the tree, the function should return 0. It should also return 0 if the value is not present in the tree. Both of these functions will likely be harder to implement than any of the prior functions in this lab. However, correct implementations of getPredecessor() and getSuccessor look VERY similar, so you will likely be able to reuse a lot of your logic.

+ +

Finally, move on to remove(), which is likely the hardest algorithm you will be asked to implement this quarter. It is not excessively complicated in principle, but getting it completely right can take a while. Consider switching off pilot and navigator as you are debugging your implementation. You will probably find it helpful to use either getPredecessor() or getSuccessor() in remove(). You can also use remove() inside of itself, though it should NOT be a recursive function–the difference being that only one additional call of remove() should EVER occur. As with predecessors and successors, drawing the tree will be very helpful.

+ +

A correct implementation of all functions should produce the following output from testbst when selecting option 0:

+ +
BST:
+  pre-order: 64 8 4 32 16 128 512 256
+  in-order: 4 8 16 32 64 128 256 512
+  post-order: 4 16 32 8 256 512 128 64
+  sum: 1020
+  count: 8
+  contains 64? Y
+  contains 4? Y
+  contains 16? Y
+  contains 128? Y
+  contains 17? N
+  contains 512? Y
+  predecessor of 64 is: 32
+  predecessor of 512 is: 256
+  predecessor of 4 is: 0
+  successor of 64 is: 128
+  successor of 512 is: 0
+  successor of 4 is: 8
+  removing 4
+  removing 64
+  removing 128
+  contains 64? N
+  contains 4? N
+  contains 16? Y
+  contains 128? N
+  contains 17? N
+  contains 512? Y
+  in-order: 8 16 32 256 512
+Empty BST:
+  pre-order:
+  in-order:
+  post-order:
+  sum: 0
+  count: 0
+  contains 16? N
+
+

Step 5: Create a testbench in a file test_intbst.cpp

+ +

In a file named test_intbst.cpp, include code to test all the functions that you implemented in intbst.cpp. Make sure that this file is compilable.

+ +

Step 6: Submit your revised intbst.cpp, test_intbst.cpp and intbst.h

+ +

You are allowed to modify intbst.h, though you should not need to, so submit both intbst.cpp and intbst.h to Gradescope for a grade out of 100.

+ + +
+ + + + +
+ + diff --git a/_site/lab_list/index.html b/_site/lab_list/index.html index 9cf6eea..82f5254 100644 --- a/_site/lab_list/index.html +++ b/_site/lab_list/index.html @@ -307,6 +307,19 @@

Labs:

+ + + lab03 + true + Binary Search Tree + Thu 10/26 09:00AM + Wed 11/01 11:59PM + + + + + + diff --git a/_site/lectures/CS24_Lecture6.pdf b/_site/lectures/CS24_Lecture6.pdf index 259e4d8..1f64aac 100644 Binary files a/_site/lectures/CS24_Lecture6.pdf and b/_site/lectures/CS24_Lecture6.pdf differ diff --git a/_site/lectures/CS24_Lecture6_ann.pdf b/_site/lectures/CS24_Lecture6_ann.pdf new file mode 100644 index 0000000..1439af4 Binary files /dev/null and b/_site/lectures/CS24_Lecture6_ann.pdf differ diff --git a/_site/lectures/CS24_Lecture7.pdf b/_site/lectures/CS24_Lecture7.pdf new file mode 100644 index 0000000..e7304bc Binary files /dev/null and b/_site/lectures/CS24_Lecture7.pdf differ diff --git a/_site/lectures/CS24_Lecture7_ann.pdf b/_site/lectures/CS24_Lecture7_ann.pdf new file mode 100644 index 0000000..992c591 Binary files /dev/null and b/_site/lectures/CS24_Lecture7_ann.pdf differ diff --git a/_site/lectures/CS24_Lecture8.pdf b/_site/lectures/CS24_Lecture8.pdf new file mode 100644 index 0000000..8fd4b0a Binary files /dev/null and b/_site/lectures/CS24_Lecture8.pdf differ diff --git a/_site/lectures/lect06/index.html b/_site/lectures/lect06/index.html index 71a7a0c..6d1f3ba 100644 --- a/_site/lectures/lect06/index.html +++ b/_site/lectures/lect06/index.html @@ -251,6 +251,8 @@ lect06 + Next Lecture + diff --git a/_site/lectures/lect07/index.html b/_site/lectures/lect07/index.html new file mode 100644 index 0000000..c9c83c9 --- /dev/null +++ b/_site/lectures/lect07/index.html @@ -0,0 +1,294 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Lect07 | CS24 Fall 2023 + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
Previous Lecturelect07Next Lecture
+ + +

Code from lecture

+

https://github.com/ucsb-cs24-f23/cs24-f23-lectures/tree/main/lect07

+ +

Topics

+
    +
  • We’ll wrap up our discussion of BSTs +
      +
    • Remaining BST operations (predecessor, successor, delete)
    • +
    +
  • +
  • Discuss and motivate runtime analysis
  • +
+ +
+ + + + +
+ + diff --git a/_site/lectures/lect08/index.html b/_site/lectures/lect08/index.html new file mode 100644 index 0000000..835c4dc --- /dev/null +++ b/_site/lectures/lect08/index.html @@ -0,0 +1,292 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Lect08 | CS24 Fall 2023 + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Previous Lecturelect08
+ + +

Code from lecture

+

https://github.com/ucsb-cs24-f23/cs24-f23-lectures/tree/main/lect08

+ +

Topics

+
    +
  • We’ll wrap up our discussion of BSTs +
      +
    • Remaining BST operations (predecessor, successor, delete)
    • +
    +
  • +
  • Discuss and motivate runtime analysis
  • +
+ +
+ + + + +
+ +