oanaunciuleanu22 nov. 20221 minWeighted Job Scheduling in JAVAYou receive a list of jobs that have three elements: start time, finish time and profit. You have to schedule the jobs with no...
oanaunciuleanu22 nov. 20221 minTotal number of non-decreasing numbers with n digits in JAVAA non-decreasing number has every digit greater than or equal to the previous digit. Given the number of digits, find how many numbers...
oanaunciuleanu22 nov. 20221 minTiling Problem in JAVAYou can use a board that is 2 x n size. The tiles are of size 2 x 1. Count the number of ways to tile the board. Tiles can be placed...
oanaunciuleanu22 nov. 20221 minSubset Sum Problem in JAVAGiven a set of non-negative integers, and a value sum, determine if there is a subset of the given set with the sum equal to the given...
oanaunciuleanu22 nov. 20221 minShortest Common Supersequence in JAVAGiven two strings as input, the task is to find the length of the shortest string that has both strings as subsequences. Solution: 1. ...