Showing 3 of 9 questions
You're given a graph; your goal is to add edges to it so that every node has an even degree. Find the minimum number of edges to add to achieve this.
#1. Add Edges to Make Degrees of All Nodes Even
Find the longest path in a tree where no two adjacent nodes on the path have the same character. The tree is defined by parent-child relationships and each node has an associated character.
#2. Longest Path With Different Adjacent Characters
You are given a grid of numbers. Find the maximum possible score by traversing the grid, starting from the top-left cell and ending at the bottom-right cell, following specific movement rules.
#3. Maximum Score From Grid Operations