[AoC 2021] Day 4: #Rust

preview_player
Показать описание


#rust #rustlang #programming #aoc2021
Рекомендации по теме
Комментарии
Автор

Thanks I am new to rust and this helped me a lot...but too much memory consumption!? In my C++ implementation I just used one vector of moves and a pair of struct ScoreInfo { size_t win_move_indx; u64 score;}; I only reuse 10 fixed size arrays again and again to read one board at a time optionally calculate ScoreInfo if it is a winning board, then I update score_info pair based on win_move_index. But with rust I get stacked here and there its not friendly at all ... I think I need to read more code to get used to it, so thanks for the video and clear explanation.

negvorsa