massed compute cupon

JonDurbin

1306. Jump Game III

Given an array of non-negative integers arr, you are initially positioned at start index of the array. When you are at index i, you can jump to i + arr[i] or i - arr[i], check if you can reach any index with value 0. Notice that you can not jump outside of the array at any time.
/**
 * @param {number[]} arr
 * @param {number} start
 * @return {boolean}
 */
var canReach = function(arr, start) {
    const n = arr.length;
    const queue = [start];
    const visited = new Array(n).fill(false);
    visited[start] = true;

    while (queue.length > 0) {
        const i = queue.shift();

        // If we reached a zero, we're done
        if (arr[i] === 0) return true;

        // Try both directions
        const next1 = i + arr[i];
        const next2 = i - arr[i];

       

English Reading Task: Global Affairs

English Reading Task: Global Affairs
C2 Level – Advanced Comprehension and Analysis
Reading Text

In recent years, global affairs have become increasingly complex and
interconnected. International organisations, such as the United Nations and the
World Health Organization, play a pivotal role in addressing transnational
challenges, including climate change, pandemics, and economic instability. These
issues rarely remain confined within national borders; instead, they spread rapidly
thro

154. Find Minimum in Rotated Sorted Array II

Suppose an array of length n sorted in ascending order is rotated between 1 and n times. For example, the array nums = [0,1,4,4,5,6,7] might become: [4,5,6,7,0,1,4] if it was rotated 4 times. [0,1,4,4,5,6,7] if it was rotated 7 times. Notice that rotating an array [a[0], a[1], a[2], ..., a[n-1]] 1 time results in the array [a[n-1], a[0], a[1], a[2], ..., a[n-2]]. Given the sorted rotated array nums that may contain duplicates, return the minimum element of this array. You must decrease the overall operation steps as much as possible.
/**
 * @param {number[]} nums
 * @return {number}
 */
var findMin = function(nums) {
    let left = 0, right = nums.length - 1;

    while (left < right) {
        const mid = Math.floor((left + right) / 2);

        if (nums[mid] < nums[right]) {
            right = mid;            // min is in [left, mid]
        } else if (nums[mid] > nums[right]) {
            left = mid + 1;         // min is in [mid, right]
        } else {
            right--;                // duplicates: shrink safely
 

153. Find Minimum in Rotated Sorted Array

Suppose an array of length n sorted in ascending order is rotated between 1 and n times. For example, the array nums = [0,1,2,4,5,6,7] might become: [4,5,6,7,0,1,2] if it was rotated 4 times. [0,1,2,4,5,6,7] if it was rotated 7 times. Notice that rotating an array [a[0], a[1], a[2], ..., a[n-1]] 1 time results in the array [a[n-1], a[0], a[1], a[2], ..., a[n-2]]. Given the sorted rotated array nums of unique elements, return the minimum element of this array. You must write an algorithm that runs in O(log n) time.
/**
 * @param {number[]} nums
 * @return {number}
 */
var findMin = function(nums) {
    let left = 0;
    let right = nums.length - 1;

    while (left < right) {
        const mid = Math.floor((left + right) / 2);

        // If mid element is greater than the rightmost,
        // the minimum is in the right half.
        if (nums[mid] > nums[right]) {
            left = mid + 1;
        } else {
            // Otherwise, the minimum is in the left half (including mid)
            right = mid

PRD to html site

https://claude.ai/public/artifacts/c314b2b5-f351-4e94-bb24-752c4d255a4b

how to record a trace a test using a command in the terminal in Playwright?

npx playwright test --trace on
# then to see the trace
npx playwright show-report

Correlation

Pearson Correlation
  pearson_coef, p_value = stats.pearsonr(df['']. df[''])

2784. Check if Array is Good

You are given an integer array nums. We consider an array good if it is a permutation of an array base[n]. base[n] = [1, 2, ..., n - 1, n, n] (in other words, it is an array of length n + 1 which contains 1 to n - 1 exactly once, plus two occurrences of n). For example, base[1] = [1, 1] and base[3] = [1, 2, 3, 3]. Return true if the given array is good, otherwise return false. Note: A permutation of integers represents an arrangement of these numbers.
/**
 * @param {number[]} nums
 * @return {boolean}
 */
var isGood = function(nums) {
    const n = Math.max(...nums);

    // Condition 1: length must be n + 1
    if (nums.length !== n + 1) return false;

    // Count frequencies
    const freq = new Map();
    for (let x of nums) {
        freq.set(x, (freq.get(x) || 0) + 1);
    }

    // Check 1..n-1 appear exactly once
    for (let i = 1; i < n; i++) {
        if (freq.get(i) !== 1) return false;
    }

    // Check n appears exactly twice

how to show the report in Playwright?

npx playwright show-report

ollama api key

ffad8d753bf24173939d651c5f284bca.j5SL1kot8x6NItLLegBysiIg

1674. Minimum Moves to Make Array Complementary

You are given an integer array nums of even length n and an integer limit. In one move, you can replace any integer from nums with another integer between 1 and limit, inclusive. The array nums is complementary if for all indices i (0-indexed), nums[i] + nums[n - 1 - i] equals the same number. For example, the array [1,2,3,4] is complementary because for all indices i, nums[i] + nums[n - 1 - i] = 5. Return the minimum number of moves required to make nums complementary.
/**
 * @param {number[]} nums
 * @param {number} limit
 * @return {number}
 */
var minMoves = function(nums, limit) {
    const n = nums.length;
    const diff = new Array(2 * limit + 2).fill(0);

    for (let i = 0; i < n / 2; i++) {
        const a = nums[i];
        const b = nums[n - 1 - i];
        const mn = Math.min(a, b);
        const mx = Math.max(a, b);
        const s = a + b;

        // Base: everything costs 2 moves
        diff[2] += 2;
        diff[2 * limit + 1] -= 2;

        

SHIPSTATION

(http.request.uri.path contains "/rest/") or (http.request.uri.path contains "/graphql") or (http.request.uri.path contains "/api/")

impeccalbe commands

## Impeccable — the “design‑fluency” agent skill

**TL;DR** – Impeccable is a portable *agent skill* that gives any code‑generation LLM (Claude Code, Cursor, Gemini‑CLI, Codex CLI, etc.) a shared design vocabulary and a set of 23 concrete commands (`/impeccable …`).  
It can *teach* the model design fundamentals, *audit* a code‑base for UI anti‑patterns, *polish* existing UI, and even *live‑edit* components directly in the browser.  
You install it once (`npx skills add pbakaus/impeccable`) 

open links

ios - xcrun simctl openurl booted "https://example.ru/"
android -  adb shell am start -a android.intent.action.VIEW -d "https://example.ru/"

resend api key

re_MUhQG4gg_QCoTztF4heDf3rgA48ydrJYC