From 71f1022dea5bd29061fabf22337d68fb5bc97b14 Mon Sep 17 00:00:00 2001 From: rogerwang2008 Date: Mon, 28 Sep 2026 14:05:06 +0800 Subject: [PATCH] some programs!! --- .idea/workspace.xml | 580 +++++++++++------- CMakeLists.txt | 2 +- _others/others_test.c.cpp | 50 ++ _others/qyz/gdbh.cpp | 43 -- _others/qyz/test.cpp | 18 - ...actions.cpp => dh_00_05_sum_fractions.cpp} | 0 ...mbers.cpp => dh_00_10_smaller_numbers.cpp} | 0 ..._init.py => dh_00_11_count_digits_init.py} | 0 ...hange.cpp => dh_00_12_bottle_exchange.cpp} | 0 ...20260909_13_flip.cpp => dh_00_13_flip.cpp} | 0 ...encryption.cpp => dh_00_14_encryption.cpp} | 0 ..._15_jusephus.cpp => dh_00_15_jusephus.cpp} | 0 ...6_swap_bits.cpp => dh_00_16_swap_bits.cpp} | 0 cs101/{dh_20260917_01.cpp => dh_01_01.cpp} | 0 ...0917_02_subway.cpp => dh_01_02_subway.cpp} | 0 cs101/{dh_20260917_03.cpp => dh_01_03.cpp} | 0 cs101/{dh_20260917_04.cpp => dh_01_04.cpp} | 0 ...20260917_05_vote.cpp => dh_01_05_vote.cpp} | 0 ..._or_walk.cpp => dh_03_01_bike_or_walk.cpp} | 0 ...ngles.cpp => dh_03_02_draw_rectangles.cpp} | 0 cs101/{dh_20260923_03.cpp => dh_03_03.cpp} | 0 ...260923_04_lamps.cpp => dh_03_04_lamps.cpp} | 0 cs101/dh_03_05_perfect_cubes.cpp | 54 ++ cs101/dh_04_01_fibonacci.cpp | 31 + cs101/dh_04_04_balloons_init1.py | 17 + cs101/sh_04_04_balloons.cpp | 26 + .../dsa_0201_dictionary.cpp | 0 .../dsa_0202_card_stacking.cpp | 0 .../dsa_0203_string_insertion.cpp | 0 .../dsa_0204_prefix_cycle.cpp | 0 .../dsa_0205_polynomial_addition.cpp | 0 .../dsa_0206_binary_query.cpp | 0 .../dsa_0217_magic_square.cpp | 0 .../dsa_0301_sliding_window.cpp | 111 ++++ .../dsa_0301_sliding_window_SLOW.cpp | 38 ++ dsa/ch3_stack_queue/dsa_0302_calculator.cpp | 165 +++++ .../dsa_0302_calculator_WRONG.cpp | 137 +++++ .../dsa_0306_stack_operation.cpp | 46 ++ 38 files changed, 1037 insertions(+), 281 deletions(-) create mode 100644 _others/others_test.c.cpp delete mode 100644 _others/qyz/gdbh.cpp delete mode 100644 _others/qyz/test.cpp rename cs101/{dh_20260909_05_sum_fractions.cpp => dh_00_05_sum_fractions.cpp} (100%) rename cs101/{dh_20260909_10_smaller_numbers.cpp => dh_00_10_smaller_numbers.cpp} (100%) rename cs101/{dh_20260909_11_count_digits_init.py => dh_00_11_count_digits_init.py} (100%) rename cs101/{dh_20260909_12_bottle_exchange.cpp => dh_00_12_bottle_exchange.cpp} (100%) rename cs101/{dh_20260909_13_flip.cpp => dh_00_13_flip.cpp} (100%) rename cs101/{dh_20260909_14_encryption.cpp => dh_00_14_encryption.cpp} (100%) rename cs101/{dh_20260909_15_jusephus.cpp => dh_00_15_jusephus.cpp} (100%) rename cs101/{dh_20260909_16_swap_bits.cpp => dh_00_16_swap_bits.cpp} (100%) rename cs101/{dh_20260917_01.cpp => dh_01_01.cpp} (100%) rename cs101/{dh_20260917_02_subway.cpp => dh_01_02_subway.cpp} (100%) rename cs101/{dh_20260917_03.cpp => dh_01_03.cpp} (100%) rename cs101/{dh_20260917_04.cpp => dh_01_04.cpp} (100%) rename cs101/{dh_20260917_05_vote.cpp => dh_01_05_vote.cpp} (100%) rename cs101/{dh_20260923_01_bike_or_walk.cpp => dh_03_01_bike_or_walk.cpp} (100%) rename cs101/{dh_20260923_02_draw_rectangles.cpp => dh_03_02_draw_rectangles.cpp} (100%) rename cs101/{dh_20260923_03.cpp => dh_03_03.cpp} (100%) rename cs101/{dh_20260923_04_lamps.cpp => dh_03_04_lamps.cpp} (100%) create mode 100644 cs101/dh_03_05_perfect_cubes.cpp create mode 100644 cs101/dh_04_01_fibonacci.cpp create mode 100644 cs101/dh_04_04_balloons_init1.py create mode 100644 cs101/sh_04_04_balloons.cpp rename dsa/{linear_list => ch2_linear_list}/dsa_0201_dictionary.cpp (100%) rename dsa/{linear_list => ch2_linear_list}/dsa_0202_card_stacking.cpp (100%) rename dsa/{linear_list => ch2_linear_list}/dsa_0203_string_insertion.cpp (100%) rename dsa/{linear_list => ch2_linear_list}/dsa_0204_prefix_cycle.cpp (100%) rename dsa/{linear_list => ch2_linear_list}/dsa_0205_polynomial_addition.cpp (100%) rename dsa/{linear_list => ch2_linear_list}/dsa_0206_binary_query.cpp (100%) rename dsa/{linear_list => ch2_linear_list}/dsa_0217_magic_square.cpp (100%) create mode 100644 dsa/ch3_stack_queue/dsa_0301_sliding_window.cpp create mode 100644 dsa/ch3_stack_queue/dsa_0301_sliding_window_SLOW.cpp create mode 100644 dsa/ch3_stack_queue/dsa_0302_calculator.cpp create mode 100644 dsa/ch3_stack_queue/dsa_0302_calculator_WRONG.cpp create mode 100644 dsa/ch3_stack_queue/dsa_0306_stack_operation.cpp diff --git a/.idea/workspace.xml b/.idea/workspace.xml index c281a00..68352ba 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -23,22 +23,24 @@ + + - - + - + + @@ -50,6 +52,7 @@ + @@ -61,18 +64,20 @@ + + + + - - @@ -81,66 +86,75 @@ + + + + - + + - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -173,6 +187,10 @@