Algorithms

4 posts

kakao4 min readCurated summary

2026 Kakao Group New Crew Recruitment Coding Test Round 1 Problem Explanations

The post explains the first-round coding test for Kakao Group’s 2026 new-crew recruitment, covering seven problems of gradually increasing difficulty; the provided text details the first five. The solutions rely on string processing, simulation, graph traversal, and structural optimization. The main lesson is to exploit each problem’s constraints and identify the right representation before implementing. ## Problem 1: Preventing Spoilers in Important Words - Split the message into space-separated words and record each word’s character interval. - Classify words as spoiler-protected if their interval overlaps any spoiler range. - Store non-spoiler words in a set or hash map to detect duplicates. - Scan protected words from left to right: - Reject words appearing outside spoiler ranges. - Reject words duplicating an already revealed important word. - Count and record valid words. - Later test groups add overlapping spoiler ranges and duplicate words, requiring both types of deduplication. ## Problem 2: Yellow Traffic Lights - Each light repeats a cycle of green, red, and yellow durations. - The task is to find the first time when every light is yellow. - Since cycles repeat, simulation only needs to continue through the least common multiple of all cycle lengths. - Because each duration is at most 20, a bounded simulation is also feasible. - Possible implementations include: - Updating each light’s state every second. - Precomputing states up to the termination time. - Checking directly whether time `t` lies in each light’s yellow interval. - If no simultaneous yellow period occurs within a full combined cycle, the answer does not exist. ## Problem 3: Maximizing the Number of Leaf Nodes - A split of degree `k` consumes one unit of distribution budget and increases the leaf count by `k - 1`. - Since split degrees are limited to 2 and 3, every path product has the form `2^p × 3^q` and must remain within `split_limit`. - Two structural properties simplify the optimization: - Partial splitting can be rearranged so it occurs at only one depth within a consecutive block of equal split degrees. - Blocks of degree-2 splits should be placed above degree-3 blocks because they use less budget for the same eventual frontier size. - Therefore, an optimal tree consists of: - Consecutive layers of 2-way splits. - Followed by consecutive layers of 3-way splits. - At most one partially split layer. - Enumerate feasible pairs `(i, j)` satisfying `2^i × 3^j ≤ split_limit`. - Fully process each layer while budget allows; at the first insufficient layer, perform as many partial splits as possible and calculate the resulting leaf count. ## Problem 4: Virus Pipes - The tree’s edges use one of three pipe types: A, B, or C. - Opening a pipe type infects every currently reachable organism through connected pipes of that type. - Infection is permanent, and reopening the same type consecutively has no effect. - For each possible pipe-opening sequence: - Start a DFS or BFS from all infected organisms. - Traverse only edges of the selected type. - Mark newly reached organisms as infected. - Exhaustive search is practical because the number of pipe openings is at most 10, yielding at most `3^10 = 59,049` sequences. ## Problem 5: Organizing Kakao Apps - Apps are represented by square blocks on a grid. - Pushing one app by one cell can push blocking apps in the same direction. - Apps leaving one edge wrap around to the opposite side, potentially causing further collisions. - Process each command by: - Using the initially pushed app as a BFS seed. - Finding all apps that must move together. - Moving them one cell simultaneously. - Treating clipped apps that cross the boundary as new seeds. - Repeating until no new seeds remain. - Blocks may be larger than one cell, so collisions can propagate across multiple rows and columns. - With grid dimensions and block sizes bounded by 10, direct simulation is sufficiently efficient and terminates because the state space is finite. Overall, the recommended approach is to model each problem according to its mechanics: sets for duplicate word handling, periodicity for traffic lights, structural exchange arguments for tree optimization, exhaustive DFS/BFS for pipe sequences, and layered BFS simulation for grid movement.

Read original(opens in new tab)
figma2 min readCurated summary

Issue No.14: Software Is Culture | Figma Blog

Software increasingly shapes how people communicate, play, create, eat, and connect. Figma’s January 2026 newsletter argues that as AI evolves from tool to teammate, software will become more responsive to human needs—and its cultural influence will grow. The issue explores this idea through design, language, gaming, food, and physical fabrication. ## Design Is Culture - Familiar interactions such as pinch-to-zoom, infinite scroll, and tap-to-like were once novel inventions. - These interface patterns have had a major influence on how an entire generation thinks and feels. - The newsletter highlights 10 iconic interactions to examine their broader cultural impact. ## Language Is Culture - Social media and recommendation algorithms help new slang spread rapidly, including expressions such as “6-7,” “aura,” and “rizz.” - Linguist Adam Aleksic explains that algorithms influence not only how people speak, but also how they think and relate to one another. - “Algospeak” has become a measure of virality and a distinctive feature of online communication. ## Gaming Is Culture - Video games have grown from simple experiences like Pong into a $184 billion industry built around expansive worlds, characters, game modes, and side quests. - Despite this complexity, players often navigate games through a small set of controller inputs. - Epic Games UX designer Aashrey Sharma examines how these simple controls enable rich interactions and what they suggest about the future of interfaces. ## Food Is Culture - British Columbia’s small farms are under pressure from factory farming and rising costs, with farmers reportedly leaving the industry at an alarming rate. - Entrepreneur Aaron Veale used Figma Make to build a marketplace connecting local growers with restaurants. - By prompting the AI tool, he produced a working minimum viable product in less than three weeks, demonstrating how AI can help individuals address urgent community problems. ## Fabrication Is Culture - Designer Kelsey Fairhurst combines digital design with hands-on manufacturing to create “softline brutalist” stainless-steel flatware. - Her Forks Plus project grew through years of research and work between a Brooklyn studio and a Cleveland fabrication shop. - The story presents software and design tools as companions to physical making rather than replacements for it. The newsletter’s central recommendation is implicit: treat software as a cultural force, not merely a productivity tool. Designers and builders should consider how the interfaces and AI systems they create will shape behavior, language, creativity, and everyday life.

Read original(opens in new tab)
figma2 min readCurated summary

Chat, Are We Cooked? How Language Has Become the New Metric of Virality | Figma Blog

Social media algorithms are reshaping language by turning words into signals of virality. Linguist Adam Aleksic argues that platforms influence not only how people speak, but also how they understand identity, culture, and one another. While this linguistic creativity is not inherently harmful, users should recognize how algorithms can strip terms from their original contexts and spread ideological ideas. ## Products Shape Communication and Identity - Interfaces communicate values as well as functionality, reflecting Marshall McLuhan’s idea that “the medium is the message.” - Tinder’s swiping system commoditizes dating and reinforces associations such as “right” being positive and “left” being negative. - Dating platforms encourage users to perform and categorize themselves according to available features: - Hinge prompts users to present a structured story. - Grindr encourages identity categories such as “bear” or “twink.” - These design choices can affect both outward self-expression and people’s internal understanding of identity. ## Algorithms Accelerate Linguistic Change - Online communities create slang, while recommendation algorithms expose it to much larger audiences. - This produces “context collapse”: users encounter words outside the communities and cultural settings where they originated. - Platform metadata now includes every word users write or say, not just hashtags, making language itself a mechanism for discovering and promoting content. - Influencers can popularize expressions whose origins their audiences may not recognize. ## From Ballroom Slang to Mainstream Vocabulary - Terms such as “slay,” “serve,” “queen,” “cooked,” “ate,” “bussin’,” and “it’s giving” have roots in African American and queer ballroom culture. - Historically, slang spread gradually through connected social groups; algorithms now accelerate that process dramatically. - As words become mainstream, their original connotations may weaken or change. - Aleksic emphasizes the importance of understanding these origins rather than treating viral slang as context-free vocabulary. ## Memes as Cultural and Ideological Vehicles - Aleksic is less concerned with linguistic change itself than with the ideas carried by newly popular terms. - Expressions from online subcultures, including incel communities, can enter mainstream usage through meme circulation. - Terms such as “looksmaxxing” and “-pilled” may spread because memes make unfamiliar or troubling ideas more accessible. - Memes can effectively “Trojan-horse” concepts into broader culture, though critical awareness can reduce their potential harm. Users should enjoy the flexibility and creativity of evolving language while remaining attentive to where viral terms come from, what meanings they lose, and which beliefs they may carry into the mainstream.

Read original(opens in new tab)
googleOriginal article

Securing private data at scale with differentially private partition selection (opens in new tab)

Google Research has introduced a novel parallel algorithm called MaxAdaptiveDegree (MAD) to enhance differentially private (DP) partition selection, a critical process for identifying common data items in massive datasets without compromising individual privacy. By utilizing an adaptive weighting mechanism, the algorithm optimizes the utility-privacy trade-off, allowing researchers to safely release significantly more data than previous non-adaptive methods. This breakthrough enables privacy-preserving analysis on datasets containing hundreds of billions of items, scaling up to three orders of magnitude larger than existing sequential approaches. ## The Role of DP Partition Selection * DP partition selection identifies a meaningful subset of unique items from large collections based on their frequency across multiple users. * The process ensures that no single individual's data can be identified in the final list by adding controlled noise and filtering out items that are not sufficiently common. * This technique is a foundational step for various machine learning tasks, including extracting n-gram vocabularies for language models, analyzing private data streams, and increasing efficiency in private model fine-tuning. ## The Weight, Noise, and Filter Paradigm * The standard approach to private partition selection begins by computing a "weight" for each item, typically representing its frequency, while ensuring "low sensitivity" so no single user has an outsized impact. * Random Gaussian noise is added to these weights to obfuscate exact counts, preventing attackers from inferring the presence of specific individuals. * A threshold determined by DP parameters is then applied; only items whose noisy weights exceed this threshold are included in the final output. ## Improving Utility via Adaptive Weighting * Traditional non-adaptive methods often result in "wastage," where highly popular items receive significantly more weight than necessary to cross the selection threshold. * The MaxAdaptiveDegree (MAD) algorithm introduces adaptivity by identifying items with excess weight and rerouting that weight to "under-allocated" items sitting just below the threshold. * This strategic reallocation allows a larger number of less-frequent items to be safely released, significantly increasing the utility of the dataset without compromising privacy or computational efficiency. ## Scalability and Parallelization * Unlike sequential algorithms that process data one piece at a time, MAD is designed as a parallel algorithm to handle the scale of modern user-based datasets. * The algorithm can process datasets with hundreds of billions of items by breaking the problem down into smaller parts computed simultaneously across multiple processors. * Google has open-sourced the implementation on GitHub to provide the research community with a tool that maintains robust privacy guarantees even at a massive scale. Researchers and data scientists working with large-scale sensitive datasets should consider implementing the MaxAdaptiveDegree algorithm to maximize the amount of shareable data while strictly adhering to user-level differential privacy standards.