life is too short for a diary



Posts Tagged: java (Page 7)

The number of Weak Characters in the Game

You are playing a game that contains multiple characters, and each of the characters has two main properties: attack and defense. You are given a 2D integer array properties where properties[i] = [attacki, defensei] represents the properties of the ith character in the game....

Continue reading → java



House Robber Leetcode Solution

You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security systems connected and it will automatically contact the police if two adjacent houses were broken into on the same night...

Continue reading → javascript java python rust



Kata - Correct the Time String

In this [kata](https://www.codewars.com/kata/57873ab5e55533a2890000c7/), you are given a string that represents a time in the format "HH:MM:SS". The string may be in the wrong format, or it may be missing some characters. Your task is to correct the string so that it represents a valid time...

Continue reading → java javascript