[LeetCode] Fraction Addition and Subtraction

592. Fraction Addition and Subtraction

Given a string expression representing an expression of fraction addition and subtraction, return the calculation result in string format.

The final result should be an irreducible fraction. If your final result is an integer, change it to the format of a fraction that has a denominator 1. So in this case, 2 should be converted to 2/1.

Read more
[LeetCode] Maximum XOR for Each Query

1829. Maximum XOR for Each Query

You are given a sorted array nums of n non-negative integers and an integer maximumBit. You want to perform the following query n times:

  1. Find a non-negative integer k < 2maximumBit such that nums[0] XOR nums[1] XOR … XOR nums[nums.length-1] XOR k is maximized. k is the answer to the ith query.
  2. Remove the last element from the current array nums.

Return an array answer, where answer[i] is the answer to the ith query.

Read more
[LeetCode] Convert to Base -2

1017. Convert to Base -2

Given an integer n, return a binary string representing its representation in base -2.

Note that the returned string should not have leading zeros unless the string is “0”.

Read more
[BOJ] 10256 돌연변이Read more
[BOJ] 9250 문자열 집합 판별Read more
[AtCoder] F - Three Variables GameRead more
[AtCoder] E - This Message Will Self-Destruct in 5sRead more
[AtCoder] D - I hate FactorizationRead more
[AtCoder] E - Colorful BlocksRead more
[AtCoder] D - TeleporterRead more