Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
7e5f6fd
add (solution): add addition task
GanjaMember Nov 28, 2025
918f221
add (solution): add rms task
GanjaMember Nov 28, 2025
674d723
add (solution): add quadratic task
GanjaMember Nov 28, 2025
3e0971d
add (solution): add print_bits task
GanjaMember Nov 28, 2025
8888db2
add (solution): add length_lit task
GanjaMember Nov 28, 2025
6ba1cc7
add (solution): add check_flags task
GanjaMember Nov 28, 2025
03782e6
add (solution): add char_changer task
GanjaMember Nov 28, 2025
6d671ea
add (github): add .gitignore file
GanjaMember Dec 3, 2025
c36c0b9
Merge branch 'main' of https://github.com/psds-cpp/psds-cpp-2025
GanjaMember Dec 3, 2025
2b0311d
update (github): add main.cpp in .gitignore
GanjaMember Dec 3, 2025
a1eb37d
Merge branch 'main' of https://github.com/psds-cpp/psds-cpp-2025
GanjaMember Dec 3, 2025
2901a4a
Merge branch 'main' of https://github.com/psds-cpp/psds-cpp-2025
GanjaMember Dec 3, 2025
70b6212
add (solution): add func_array task
GanjaMember Dec 3, 2025
fcce802
add (solution): add last_of_us task
GanjaMember Dec 3, 2025
3b1e4ba
add (solution): add little_big task
GanjaMember Dec 3, 2025
f316b43
add (solution): add longest task
GanjaMember Dec 3, 2025
c187692
add (solution): add pretty_array task
GanjaMember Dec 3, 2025
bef6f6f
add (solution): add swap_ptr task
GanjaMember Dec 3, 2025
7942e20
Merge branch 'main' of https://github.com/psds-cpp/psds-cpp-2025
GanjaMember Dec 11, 2025
4e843ca
Merge branch 'main' of https://github.com/psds-cpp/psds-cpp-2025
GanjaMember Dec 16, 2025
b5e6048
add (solution): add data_stats task
GanjaMember Dec 16, 2025
8bec754
add (solution): add easy_compare task
GanjaMember Dec 16, 2025
99f7f9f
add (solution): add enum_operators task
GanjaMember Dec 16, 2025
d56fc84
add (solution): add filter task
GanjaMember Dec 16, 2025
6c80a35
add (solution): add find_all task
GanjaMember Dec 16, 2025
495147e
add (solution): add minmax task
GanjaMember Dec 16, 2025
3aca2a2
add (solution): add os_overload task
GanjaMember Dec 16, 2025
fd63ae4
add (solution): add range task
GanjaMember Dec 16, 2025
da78a7e
add (solution): add unique task
GanjaMember Dec 16, 2025
1769325
chore: remove incomplete 04_week directory
GanjaMember Dec 16, 2025
c8693f4
fix (solution): fix infinite loop in range task
GanjaMember Dec 16, 2025
18eedf4
fix (solution): reduce number of comparisons to increase performance …
GanjaMember Dec 17, 2025
5321d62
Merge branch 'main' of https://github.com/psds-cpp/psds-cpp-2025
GanjaMember Dec 26, 2025
bf4e7b8
add (solution): add ring_buffer task
GanjaMember Dec 26, 2025
70ff77d
add (solution): add phasor task
GanjaMember Dec 26, 2025
fca57cf
add (solution): add queue task
GanjaMember Dec 26, 2025
171b60e
add (solution): add stack task
GanjaMember Dec 26, 2025
a178ff3
Merge branch 'main' of https://github.com/psds-cpp/psds-cpp-2025
GanjaMember Dec 26, 2025
77b1676
ref (solution): remove explicit static_cast of the second operand
GanjaMember Dec 29, 2025
b0b0dfa
ref (solution): rename variable 'k' to variable 'pos'
GanjaMember Dec 29, 2025
3ff4083
ref (solution): rewrite ineffective solution
GanjaMember Dec 29, 2025
f8ab7f0
ref (solution): create anonymous namespace with conversion constants
GanjaMember Dec 29, 2025
6f857f6
ref (solution): remove dynamic array buffer and output directly
GanjaMember Dec 29, 2025
1f9e7b4
ref (solution): remove redundant variables initialization
GanjaMember Dec 29, 2025
d9fe492
ref (solution): specify std namespace for sqrt function
GanjaMember Dec 29, 2025
8c9fa30
ref (solution): remove redundant const qualifiers in the function sig…
GanjaMember Dec 29, 2025
e586b20
ref (solution): resolve undefined behaviour with const_cast
GanjaMember Dec 29, 2025
8938cfc
ref (solution): create a common function for int and double and use t…
GanjaMember Dec 29, 2025
654d495
ref (solution): add const qualifier for returned value to correct sig…
GanjaMember Dec 29, 2025
05ec36a
ref (solution): use ternary operators to avoid code duplication
GanjaMember Dec 29, 2025
5620c8c
ref (solution): specify std namespace for sqrt function
GanjaMember Dec 29, 2025
35ad4a7
ref (solution): pass struct by reference and replace if-branching wit…
GanjaMember Dec 29, 2025
6b59a9e
ref (solution): rewrite ineffective flags output algorithm
GanjaMember Dec 29, 2025
fbf46da
ref (solution): reserve memory only after checking for early function…
GanjaMember Dec 29, 2025
216a1ff
fix (solution): include necessary library
GanjaMember Dec 29, 2025
07c7f8d
ref (solution): avoid code duplication using ternary operators
GanjaMember Dec 29, 2025
508d5a7
ref (solution): unify style of fields initialization and join separat…
GanjaMember Dec 29, 2025
757ff8e
fix (solution): comply with test awaiting return of pointer to non-co…
GanjaMember Dec 29, 2025
396cd2d
ref (solution): change snake case method naming to camel case
GanjaMember Feb 6, 2026
08fda73
ref (solution): remove unnecessary m_null_value
GanjaMember Feb 6, 2026
f7c2bb1
ref (solution): use list initialization
GanjaMember Feb 6, 2026
deaf02a
ref (solution): remove unnecessary code
GanjaMember Feb 6, 2026
21f4484
ref (solution): remove buffer copying from the RingBuffer::Resize and…
GanjaMember Feb 6, 2026
4699579
ref (solution): refactor initialization for the Queue
GanjaMember Feb 6, 2026
d8e7504
ref (solution): add the Queue::m_pushInputBack method and remove unne…
GanjaMember Feb 6, 2026
75eb5cd
Auto-sync: 2026-02-07 16:30
actions-user Feb 7, 2026
6f99537
Auto-sync: 2026-02-07 19:52
actions-user Feb 7, 2026
3c26c8e
Auto-sync: 2026-02-08 16:39
actions-user Feb 8, 2026
47c8e27
Auto-sync: 2026-02-08 16:47
actions-user Feb 8, 2026
8e83f64
Auto-sync: 2026-02-12 18:41
actions-user Feb 12, 2026
da1632a
Auto-sync: 2026-02-12 18:44
actions-user Feb 12, 2026
2e51084
chore: remove incomplete 04_week directory
GanjaMember Dec 16, 2025
7b413c0
Revert "chore: remove incomplete 04_week directory"
GanjaMember Feb 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Testing Tasks

on: [push, pull_request]
on: [push]

jobs:
test:
Expand Down Expand Up @@ -30,12 +30,17 @@ jobs:
tasks=("addition" "rms" "print_bits" "check_flags" "length_lit" "quadratic" "char_changer"
"swap_ptr" "func_array" "longest" "last_of_us" "little_big" "pretty_array"
"data_stats" "unique" "range" "minmax" "find_all" "os_overload" "easy_compare" "filter" "enum_operators"
"stack" "queue" "ring_buffer" "phasor")
"stack" "queue" "ring_buffer" "phasor"
"tracer" "string_view" "cow_string" "simple_vector")

declare -i passed_count=0
declare -i failed_count=0
declare -i task_count=0

# task name arrays
passed_tasks=()
failed_tasks=()

echo "=== Starting tests for changed tasks ==="

for task in "${tasks[@]}"; do
Expand All @@ -49,22 +54,25 @@ jobs:
if ./build/tasks/test_$task; then
echo "✅ test_$task PASSED"
passed_count+=1
passed_tasks+=("$task")
else
echo "❌ test_$task FAILED"
failed_count+=1
failed_tasks+=("$task")
fi
else
echo "❌ test_$task build FAILED"
failed_count+=1
failed_tasks+=("$task")
fi
fi
done

echo "=== Test Results Summary ==="
echo "Total tasks in list: ${#tasks[@]}"
echo "Processed: $task_count"
echo "✅ Passed: $passed_count"
echo "❌ Failed: $failed_count"
echo "✅ Passed: $passed_count [$(echo ${passed_tasks[@]} | tr ' ' ', ')]"
echo "❌ Failed: $failed_count [$(echo ${failed_tasks[@]} | tr ' ' ', ')]"

if [ $failed_count -gt 0 ]; then
echo "❌ Some tasks failed!"
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/testing_week_01.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ on:
- quadratic
- char_changer

schedule:
- cron: '59 20 4 12 *' # UTC: 20:59 = 23:59 MSK 4 December

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -33,7 +36,8 @@ jobs:
- name: Determine tasks to run
id: get-tasks
run: |
if [ "${{ github.event.inputs.tasks }}" = "all" ]; then
if [["${{ github.event_name }}" = "schedule"]] ||
[[ "${{ github.event.inputs.tasks }}" = "all" ]]; then
# Find all tasks
TASKS=()
for dir in 01_week/tasks/*/; do
Expand All @@ -48,13 +52,19 @@ jobs:

- name: Build and run tests for selected tasks
run: |
echo "Event: ${{ github.event_name }}"
echo "Tasks to test: '${{ steps.get-tasks.outputs.tasks }}'"

IFS=' ' read -ra tasks <<< "${{ steps.get-tasks.outputs.tasks }}"

declare -i passed_count=0
declare -i failed_count=0
declare -i task_count=0

# task name arrays
passed_tasks=()
failed_tasks=()

echo "=== Starting tests for selected tasks ==="

for task in "${tasks[@]}"; do
Expand All @@ -80,8 +90,8 @@ jobs:
echo "=== Test Results Summary ==="
echo "Total tasks in list: ${#tasks[@]}"
echo "Processed: $task_count"
echo "✅ Passed: $passed_count"
echo "❌ Failed: $failed_count"
echo "✅ Passed: $passed_count [$(echo ${passed_tasks[@]} | tr ' ' ', ')]"
echo "❌ Failed: $failed_count [$(echo ${failed_tasks[@]} | tr ' ' ', ')]"

if [ $failed_count -gt 0 ]; then
echo "❌ Some tasks failed!"
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/testing_week_02.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ on:
- little_big
- pretty_array

schedule:
- cron: '59 20 11 12 *' # UTC: 20:59 = 23:59 MSK 11 December

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -32,7 +35,8 @@ jobs:
- name: Determine tasks to run
id: get-tasks
run: |
if [ "${{ github.event.inputs.tasks }}" = "all" ]; then
if [["${{ github.event_name }}" = "schedule"]] ||
[[ "${{ github.event.inputs.tasks }}" = "all" ]]; then
# Find all tasks
TASKS=()
for dir in 02_week/tasks/*/; do
Expand All @@ -47,13 +51,19 @@ jobs:

- name: Build and run tests for selected tasks
run: |
echo "Event: ${{ github.event_name }}"
echo "Tasks to test: '${{ steps.get-tasks.outputs.tasks }}'"

IFS=' ' read -ra tasks <<< "${{ steps.get-tasks.outputs.tasks }}"

declare -i passed_count=0
declare -i failed_count=0
declare -i task_count=0

# task name arrays
passed_tasks=()
failed_tasks=()

echo "=== Starting tests for selected tasks ==="

for task in "${tasks[@]}"; do
Expand All @@ -79,8 +89,8 @@ jobs:
echo "=== Test Results Summary ==="
echo "Total tasks in list: ${#tasks[@]}"
echo "Processed: $task_count"
echo "✅ Passed: $passed_count"
echo "❌ Failed: $failed_count"
echo "✅ Passed: $passed_count [$(echo ${passed_tasks[@]} | tr ' ' ', ')]"
echo "❌ Failed: $failed_count [$(echo ${failed_tasks[@]} | tr ' ' ', ')]"

if [ $failed_count -gt 0 ]; then
echo "❌ Some tasks failed!"
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/testing_week_03.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ jobs:
- name: Determine tasks to run
id: get-tasks
run: |
if [ "${{ github.event.inputs.tasks }}" = "all" ]; then
if [["${{ github.event_name }}" = "schedule"]] ||
[[ "${{ github.event.inputs.tasks }}" = "all" ]]; then
# Find all tasks
TASKS=()
for dir in 03_week/tasks/*/; do
Expand All @@ -53,13 +54,19 @@ jobs:

- name: Build and run tests for selected tasks
run: |
echo "Event: ${{ github.event_name }}"
echo "Tasks to test: '${{ steps.get-tasks.outputs.tasks }}'"

IFS=' ' read -ra tasks <<< "${{ steps.get-tasks.outputs.tasks }}"

declare -i passed_count=0
declare -i failed_count=0
declare -i task_count=0

# task name arrays
passed_tasks=()
failed_tasks=()

echo "=== Starting tests for selected tasks ==="

for task in "${tasks[@]}"; do
Expand All @@ -85,8 +92,8 @@ jobs:
echo "=== Test Results Summary ==="
echo "Total tasks in list: ${#tasks[@]}"
echo "Processed: $task_count"
echo "✅ Passed: $passed_count"
echo "❌ Failed: $failed_count"
echo "✅ Passed: $passed_count [$(echo ${passed_tasks[@]} | tr ' ' ', ')]"
echo "❌ Failed: $failed_count [$(echo ${failed_tasks[@]} | tr ' ' ', ')]"

if [ $failed_count -gt 0 ]; then
echo "❌ Some tasks failed!"
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/testing_week_04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ jobs:
- name: Determine tasks to run
id: get-tasks
run: |
if [ "${{ github.event.inputs.tasks }}" = "all" ]; then
if [["${{ github.event_name }}" = "schedule"]] ||
[[ "${{ github.event.inputs.tasks }}" = "all" ]]; then
# Find all tasks
TASKS=()
for dir in 04_week/tasks/*/; do
Expand All @@ -48,13 +49,19 @@ jobs:

- name: Build and run tests for selected tasks
run: |
echo "Event: ${{ github.event_name }}"
echo "Tasks to test: '${{ steps.get-tasks.outputs.tasks }}'"

IFS=' ' read -ra tasks <<< "${{ steps.get-tasks.outputs.tasks }}"

declare -i passed_count=0
declare -i failed_count=0
declare -i task_count=0

# task name arrays
passed_tasks=()
failed_tasks=()

echo "=== Starting tests for selected tasks ==="

for task in "${tasks[@]}"; do
Expand All @@ -80,8 +87,8 @@ jobs:
echo "=== Test Results Summary ==="
echo "Total tasks in list: ${#tasks[@]}"
echo "Processed: $task_count"
echo "✅ Passed: $passed_count"
echo "❌ Failed: $failed_count"
echo "✅ Passed: $passed_count [$(echo ${passed_tasks[@]} | tr ' ' ', ')]"
echo "❌ Failed: $failed_count [$(echo ${failed_tasks[@]} | tr ' ' ', ')]"

if [ $failed_count -gt 0 ]; then
echo "❌ Some tasks failed!"
Expand Down
105 changes: 105 additions & 0 deletions .github/workflows/testing_week_05.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Testing Tasks Week 05

on:
workflow_dispatch:
inputs:
tasks:
description: 'Select tasks to test'
required: true
type: choice
default: 'all'
options:
- all
- tracer
- string_view
- cow_string
- simple_vector

schedule:
- cron: '59 20 16 02 *' # UTC: 20:59 = 23:59 MSK 16 February

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install compiler and CMake
run: sudo apt install -y cmake build-essential g++-14 libgtest-dev libgmock-dev

- name: Configure project
run: cmake -B build

- name: Determine tasks to run
id: get-tasks
run: |
if [["${{ github.event_name }}" = "schedule"]] ||
[[ "${{ github.event.inputs.tasks }}" = "all" ]]; then
# Find all tasks
TASKS=()
for dir in 05_week/tasks/*/; do
task=$(basename "$dir")
TASKS+=("$task")
done
echo "tasks=${TASKS[*]}" >> $GITHUB_OUTPUT
else
# Используем указанную задачу
echo "tasks=${{ github.event.inputs.tasks }}" >> $GITHUB_OUTPUT
fi

- name: Build and run tests for selected tasks
run: |
echo "Event: ${{ github.event_name }}"
echo "Tasks to test: '${{ steps.get-tasks.outputs.tasks }}'"

IFS=' ' read -ra tasks <<< "${{ steps.get-tasks.outputs.tasks }}"

declare -i passed_count=0
declare -i failed_count=0
declare -i task_count=0

# task name arrays
passed_tasks=()
failed_tasks=()

echo "=== Starting tests for selected tasks ==="

for task in "${tasks[@]}"; do
task_count+=1
echo "=== Processing $task ==="

if cmake --build build --target test_$task; then
echo "✅ test_$task built successfully"

if ./build/tasks/test_$task; then
echo "✅ test_$task PASSED"
passed_count+=1
passed_tasks+=("$task")
else
echo "❌ test_$task FAILED"
failed_count+=1
failed_tasks+=("$task")
fi
else
echo "❌ test_$task build FAILED"
failed_count+=1
failed_tasks+=("$task")
fi
done

echo "=== Test Results Summary ==="
echo "Total tasks in list: ${#tasks[@]}"
echo "Processed: $task_count"
echo "✅ Passed: $passed_count [$(echo ${passed_tasks[@]} | tr ' ' ', ')]"
echo "❌ Failed: $failed_count [$(echo ${failed_tasks[@]} | tr ' ' ', ')]"

if [ $failed_count -gt 0 ]; then
echo "❌ Some tasks failed!"
exit 1
elif [ $task_count -eq 0 ]; then
echo "No tasks were processed (no changes)"
exit 0
else
echo "✅ All processed tasks passed!"
exit 0
fi
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build
build-asan
.vscode
main
main.cpp
3 changes: 1 addition & 2 deletions 01_week/tasks/addition/addition.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <cstdint>
#include <stdexcept>


int64_t Addition(int a, int b) {
throw std::runtime_error{"Not implemented"};
return static_cast<int64_t>(a) + b;
}
Loading