3900 - 3999
Solutions categorised by Problem IDs
3942 - Minimum Operations to Sort a PermutationMinimize rotations and reversals needed to sort a permutation by checking the circular order in both directions.3970 - Shortest Path With At Most K Consecutive Identical CharactersFind a minimum-weight path with bounded runs of equal labels by tracking the current run length in Dijkstra's algorithm.3963 - Create Grid With Exactly One PathConstruct a grid with exactly one valid path by opening the top row and rightmost column and blocking the remaining cells.