You are given an array of integers where each element represents the cost of hiring a worker. You need to hire exactly k workers by running k sessions. In each session, choose the worker with the lowest cost from either the first ‘candidates’ workers or the last ‘candidates’ workers. If there is a tie, choose the worker with the smallest index.
Given a graph with n nodes, each node having a value, and a list of edges connecting the nodes, your task is to determine the maximum star sum that can be obtained. A star graph is a subgraph where all edges are connected to a central node. The star sum is the sum of the values of the central node and the nodes connected by edges to it. You are allowed to include at most k edges in the star graph.
You are given a matrix grid with positive integers. In each operation, remove the greatest value from each row, and if multiple elements have the same greatest value, remove any one of them. After removing the greatest value from all rows, add the maximum of these values to the answer. The number of columns decreases by one after each operation. Perform these operations until the grid is empty, and return the sum of the maximum values from all operations.
You are given two lists of words: one representing positive feedback and the other representing negative feedback. Each feedback word affects a student’s points: a positive word adds 3 points, while a negative word subtracts 1 point. For each feedback report, which is associated with a student, calculate the total score by counting the occurrences of positive and negative words. After evaluating all reports, return the top k students based on their total points. In case of a tie in points, the student with the lower ID should rank higher.
You are given a list of integers nums and an integer k. In each operation, you choose an index i, increase your score by nums[i], and replace nums[i] with ceil(nums[i] / 3). Apply exactly k operations and return the maximum score you can achieve.
You are given two integer arrays nums1 and nums2, both of size n, and a positive integer k. Your task is to select k indices from the array nums1, where the sum of the selected elements from nums1 is multiplied by the minimum element from the corresponding selected indices in nums2. The objective is to maximize this score.