brain
tamnd's digital brain — notes, problems, research
41839 notes
The problem asks us to construct the largest possible palindrome with exactly n digits such that the resulting number is divisible by k. A palindrome is a number that reads the same forward and backward. For example, 595, 1221, and 8 are palindromes.
The problem gives us an integer array nums of even length n and an integer k. We are allowed to change any element in nums to any integer in the range [0, k].
The problem gives us a circular array called colors, where each element represents the color of a tile: - 0 means red - 1 means blue Because the tiles form a circle, the first and last tiles are considered adjacent.
This problem asks us to identify students who satisfy a combination of academic requirements based on their major, completed courses, grades, and overall GPA. We are given three tables: - The students table stores each student's identity and declared major.
We are given an integer array nums and a non-negative integer k. We need to find the maximum possible length of a subsequence such that the number of adjacent unequal pairs is at most k.
The problem asks us to determine whether a given integer array is "special". An array is considered special if every pair of adjacent elements has different parity. Parity refers to whether a number is even or odd.
We are given a road represented as a string containing only two characters: - 'x' represents a pothole. - '.' represents a smooth section of road. We are also given a repair budget. A repair operation can only be applied to a contiguous group of potholes.
The problem gives us two strings, initial and target. We want to transform initial into target using the minimum number of operations.
This problem gives us an undirected weighted graph with n vertices and up to 10^5 edges. Each edge connects two vertices and has an integer weight. For every query [s, t], we must determine the minimum possible cost of any walk from node s to node t.
The problem asks us to redistribute a collection of apple packs into boxes while using the minimum number of boxes. Each pack apple[i] contains a certain number of apples, and each box capacity[j] can hold up to a certain number of apples.
This problem asks us to transform one string into another while minimizing the total conversion cost. We are given two strings, source and target, both with the same length. Each position in source must eventually become the corresponding character in target.
The problem asks us to count all integers within a given range [start, finish] that satisfy two conditions. First, the integer must end with a specific string s, meaning s is a suffix of the number. Second, each digit in the integer cannot exceed a given limit.
We are given an array nums containing positive integers. Our task is to divide all elements into two non-empty groups, nums1 and nums2. Every element must belong to exactly one of the two groups, and neither group may be empty.
The problem defines a special value called the "effective value" for every possible triplet of indices (i, j, k) in the array: where: - | is the bitwise OR operator - & is the bitwise AND operator The xor-beauty of the array is the XOR of the effective values for all possible…
We are given an m × n matrix grid where every row is already sorted in non-decreasing order. The total number of elements in the matrix is guaranteed to be odd because both m and n are odd. The task is to find the median of all values contained in the matrix.
In this problem, we are given a binary matrix called land. Each cell contains either: - 0, representing forest land - 1, representing farmland The farmland cells are organized into rectangular groups. Every group is guaranteed to form a perfect rectangle made entirely of 1s.
The problem asks us to find two non-overlapping odd-length palindromic substrings whose length product is as large as possible. We are given a string s of length up to 10^5.
The problem asks us to transform a given string of brackets into a balanced string with the minimum number of swaps. The input string s consists of n characters, where n is even, and there are exactly n / 2 opening brackets '[' and n / 2 closing brackets ']'.
This problem asks us to find the maximum product difference between two pairs of numbers from a given array. Specifically, given an array nums, we need to select four distinct indices w, x, y, z to form two pairs (nums[w], nums[x]) and (nums[y], nums[z]).
We are given an undirected graph with n nodes and a list of edges. Multiple edges between the same pair of nodes are allowed. For any pair of nodes (a, b), define incident(a, b) as the number of edges connected to either node a or node b.
The problem asks us to determine if the sum of the numerical values of two words equals the numerical value of a third word. Each word consists of lowercase letters from 'a' to 'j'.
The problem asks us to identify "imbalanced orders" from an OrdersDetails table. Each row represents a product within an order, containing the orderid, productid, and quantity ordered. An order can have multiple products, meaning multiple rows can share the same orderid.
The problem gives us a collection of inclusive integer intervals and a list of query values. For every query, we must determine the size of the smallest interval that contains that query value.
In this problem, we are given a string s where characters at even indices are always lowercase English letters, and characters at odd indices are always digits. The goal is to replace every digit with a new character computed from the character immediately before it.
Engage with Chinese environmental policy discourse, mastering the vocabulary of climate, sustainability, and environmental governance.
Complete JLPT N1 grammar reference: ~200 patterns including classical Japanese influences, literary forms, highly formal conjunctions, advanced conditionals, and nuanced distinctions separating N1 from N2.
HSK 5 | noun | the capacity or power to remember
HSK 4 | grammar pattern | presenting two contrasting or complementary aspects
HSK 4 | noun/verb | an immune reaction to a normally harmless substance
HSK 5 | verb | to adapt oneself or something to new conditions or requirements
We are given a line of ants, each with an integer strength. Mole wants to observe fights among ants in specified contiguous segments of the line. For a given segment from position l to r, every ant fights every other ant within that segment.
We are given a sequence of integers arranged in a line, and our goal is to sort them in non-decreasing order by repeatedly performing a single allowed operation: moving the last element of the sequence to the front.
We have an $n times n$ bingo board. Every cell contains a distinct number chosen from $1$ to $m$, and every valid board is equally likely. After the board is generated, exactly $k$ distinct numbers are called. Every set of $k$ numbers is equally likely.
HSK 5 | noun | media; mass media; communications industry
HSK 1 | greeting phrase | expresses sincere apology for a mistake or inconvenience
HSK 2 | particle | softens suggestions, assumptions, and tag questions
HSK 4 | noun | client, customer
万 (man/ban/yorozu): ten thousand. JLPT N5 kanji.
HSK 5 | noun | chronic disease; long-term illness that persists over time
HSK 1 | number | the digit ten; the base unit of the decimal system in Chinese
The grammar and vocabulary of Chinese legal discourse — statutory language, contract clauses, and the register of rights, obligations, and liability
HSK 5 | verb/noun | to uplift and motivate someone through an energising or moving influence
Japanese travel vocabulary: transportation, accommodation, directions, airports, stations, and essential travel phrases.
HSK 5 | adjective | having a quality or style that belongs only to itself; unique
HSK 5 | adjective | producing the desired result; legally or formally valid
HSK 5 | noun/adjective | academic major; professional field; specialized
入 (enter): 2 strokes, JLPT N5. On: ニュウ. Kun: い-る、い-れる、はい-る.
HSK 5 | noun / verb | the process of embedding AI or smart technology into systems and products
Sindarin subject pronouns: independent forms for emphasis and suffix forms attached to verbs; all 6 persons with attested examples.
送る (おくる / okuru): to send. N4 level Japanese vocabulary.
We are given several stacks of unit cubes, each stack having an initial height. In a single move, we can take exactly one cube from the top of one stack and place it on top of another stack.
HSK 4 | conjunction | adding a reinforcing reason or point
Japanese body parts, health, illness, injury, and medical vocabulary for everyday use and JLPT N5–N3.
Master all uses of the -n ending: direct object, direction, time measure, and flexible word order.
四 (shi/yot-tsu): four. JLPT N5 kanji.
HSK 8 | noun | fluid dynamics; the study of forces and motion in liquids and gases
HSK 4 | phrase | used to introduce a comparison
HSK 4 | verb/noun | the act of choosing or a choice made
HSK 2 | adjective | feeling that expectations have been met
HSK 3 | grammar pattern | expresses whether an action can or cannot achieve its result
All 181 new N4 kanji with stroke counts, on-yomi, kun-yomi, meanings, and example words. Cumulative total with N5: 284 kanji.
HSK 3 | verb | to feel regret about a past action
HSK 3 | verb | to care about, show concern for someone or something
HSK 1 | verb, preposition | to use, to employ, with (using)
Learn 〜てからというもの to express a fundamental, sustained change that began at a specific turning point.
HSK 5 | noun / verb | monopoly; to monopolize, to dominate exclusively
Complete guide to Sindarin soft mutation: all 11 initial consonant changes, every trigger category, and 30+ worked examples from Tolkien's texts.
HSK 4 | verb / noun | to imagine; imagination
HSK 4 | adjective | hypocritical; false; insincere
We are given a sequence of integers arranged in a line, and we want to split it into three contiguous segments. The cut points must produce three non-empty parts, and each part must have exactly the same sum.
HSK 2 | verb / adjective | to suddenly understand a situation; contrast with 懂 for skill-based comprehension
HSK 5 | noun | the aggregate of people living together in a structured community
HSK 4 | noun | a raw material or component used in cooking
HSKK advanced patterns, spoken coherence strategies, and the pragmatics of formal spoken Chinese at C1 level
HSK 6 | verb | to hold back or suppress the spread or growth of something
HSK 1 | noun | book
Passive voice endings for all conjugations in present, imperfect, and future indicative; agent vs. means constructions; and a preview of the perfect passive.
N1 grammar pattern 〜べく: a formal literary purposive expressing 'in order to ~, for the purpose of ~' — the written formal equivalent of ために.
Navigating the formal connective chains and specialized vocabulary of Chinese political and social commentary at C1 level
HSK 5 | noun / adjective | the activity of governance; relating to political affairs
HSK 6 | verb | to express or articulate ideas clearly and systematically
Essential Sindarin greetings and phrases directly from Tolkien's texts: Mae govannen, Hannon le, Navaer, Le abdollen, and more.
HSK 5 | noun | a physical, mathematical, or conceptual representation of a system or object
HSK 3 | noun | a written character, word, or one's handwriting
HSK 2 | adverb | again (future repetition), then, one more time
HSK 5 | noun | a person who uses a product, service, or system
We are given an $n times n$ grid that is mostly empty, except for a small number of cells that are already fixed as either x or o. Every other cell must be filled with one of these two characters.
Master all six Esperanto participles — active and passive, present, past, and future — and their use as adjectives, adverbs, and in compound tenses.
HSK 1 | noun | woman, female adult
Analyzing 政治语体: the vocabulary, rhetoric, and pragmatics of Chinese political communication.
Learn how to use 〜てたまらない (te tamaranai) to express unbearable or overwhelming feelings, sensations, or desires — 'can't stand ~; unbearably ~.' Includes structure, nuance, examples, and comparisons.
HSK 4 | verb / noun | offering analysis or opinion on something
HSK 5 | noun | economic activity driven by digital technologies and data
HSK 1 | noun | mobile phone, smartphone
10 structured lessons for JLPT N4: from reviewing N5 basics to complex grammar, passive/causative, conditionals, and practical reading/writing. Each lesson includes dialogues and exercises.
HSK 3 | noun/adjective | a deep sense of contentment and well-being
HSK 1 | noun | subway, underground railway
HSK 5 | verb/noun | to return to health after illness or injury; the process of recovery
Sindarin word-building with prefixes: directional, negative, intensifying, and stative prefixes with 40+ examples from attested names.
HSK 3 | adjective/verb | to feel let down; to be disappointed