- https://www.reddit.com/r/swaywm/comments/c1oz8p/from_gnome_shell_to_sway/
- https://www.reddit.com/r/swaywm/comments/t8k07z/what_apps_are_you_running_on_sway_wayland_native/?rdt=34776
Good sample setup:
/// https://leetcode.com/problems/intervals-between-identical-elements | |
/// | |
class Solution { | |
public long[] getDistances(int[] arr) { | |
int n = arr.length; | |
HashMap<Integer, ArrayList<Integer>> map = new HashMap<>(); | |
for (int i=0; i<n; i++) { | |
ArrayList<Integer> a = map.get(arr[i]); | |
if (a == null) { | |
a = new ArrayList<>(); |
// https://leetcode.com/problems/count-vowel-substrings-of-a-string/ | |
// https://youtu.be/hGH_Z4_jMBI | |
/// | |
class Solution { | |
public int countVowelSubstrings(String word) { | |
int n = word.length(); | |
int[] fq = new int[26]; | |
int k = 0; int l = 0; | |
int res = 0; | |
for (int r = 0; r < n; r++) { |
/* | |
https://leetcode.com/problems/move-pieces-to-obtain-a-string | |
2337. Move Pieces to Obtain a String | |
Solved | |
Medium | |
You are given two strings start and target, both of length n. Each string consists only of the characters 'L', 'R', and '_' where: | |
The characters 'L' and 'R' represent pieces, where a piece 'L' can move to the left only if there is a blank space directly to its left, and a piece 'R' can move to the right only if there is a blank space directly to its right. | |
The character '_' represents a blank space that can be occupied by any of the 'L' or 'R' pieces. |
/** | |
https://leetcode.com/problems/maximum-number-of-integers-to-choose-from-a-range-i/description/?envType=daily-question&envId=2024-12-06 | |
2554. Maximum Number of Integers to Choose From a Range I | |
Solved | |
Medium | |
Topics | |
Companies | |
Hint | |
You are given an integer array banned and two integers n and maxSum. You are choosing some number of integers following the below rules: |
/** | |
1760. Minimum Limit of Balls in a Bag | |
Medium | |
You are given an integer array nums where the ith bag contains nums[i] balls. You are also given an integer maxOperations. | |
You can perform the following operation at most maxOperations times: | |
Take any bag of balls and divide it into two new bags with a positive number of balls. |
/** | |
https://leetcode.com/problems/two-best-non-overlapping-events/ | |
2054. Two Best Non-Overlapping Events | |
Solved | |
Medium | |
Topics | |
Companies | |
Hint | |
You are given a 0-indexed 2D integer array of events where events[i] = [startTimei, endTimei, valuei]. The ith event starts at startTimei and ends at endTimei, and if you attend this event, you will receive a value of valuei. You can choose at most two non-overlapping events to attend such that the sum of their values is maximized. |
/* | |
https://leetcode.com/problems/special-array-ii | |
3152. Special Array II | |
Medium | |
An array is considered special if every pair of its adjacent elements contains two numbers with different parity. | |
You are given an array of integer nums and a 2D integer matrix queries, where for queries[i] = [fromi, toi] your task is to check that |
/* | |
https://leetcode.com/problems/find-longest-special-substring-that-occurs-thrice-i | |
2981. Find Longest Special Substring That Occurs Thrice I | |
Medium | |
You are given a string s that consists of lowercase English letters. | |
A string is called special if it is made up of only a single character. For example, the string "abc" is not special, whereas the strings "ddd", "zz", and "f" are special. |