Challenge Archive
150 past challenges
Porting a class component to hooks, a developer keeps the old setState habit and passes a callback as a SECOND argument to the useState setter. In a React development build, what happens when the user clicks the button once?
What does this code log?
One of these two random-module calls raises an error. Which, and why?
Given the three files below, which statement about `export * as math` in `index.ts` is correct?
What does this program print, measuring zero-sized types with std::mem::size_of?
What does this Go program print, given what strings.CutPrefix returns when the prefix is absent (Go 1.20+)?
A team keeps pgAdmin in its Compose file for occasional debugging, assigned to a profile as shown. What does a plain `docker compose up -d` (no extra flags, no COMPOSE_PROFILES set) start?
A page ships a nonce-based Content-Security-Policy whose script-src also includes 'strict-dynamic' alongside a host allowlist such as https://cdn.example.com. In a conforming CSP Level 3 browser, what does adding 'strict-dynamic' change about how scripts are allowed to load?
A team training an image classifier switches from uniformly shuffled minibatches to a curriculum: every example gets a difficulty score, training starts on the easiest slice, and harder examples are mixed in gradually. What is the core idea of curriculum learning?
You save the executable script below as /usr/local/bin/kubectl-hello (a directory on your PATH) and then run `kubectl hello world`. What happens?
This controlled input cancels the paste event. The user copies the word 'hello' elsewhere, focuses the empty input, and presses Ctrl+V once. What happens?
What two values does this code log, given that obj is still strongly referenced?
What does this min()/max() code with default= print?
With `target: "ES2022"` and `strict` enabled, what does this code log?
What does this program print, extracting the sign of three integers with i32::signum?
What does this Go program print, given the bases passed to strconv.FormatInt?
Both template tasks below report changed on a run against web-1. When does nginx actually restart?
A login service sets its session cookie with the name __Secure-session. What does the __Secure- name prefix cause a conforming browser to enforce before it will accept and store the cookie?
Anchor-based object detectors such as Faster R-CNN's RPN, SSD and RetinaNet tile 'anchor boxes' over the feature map. What role do these anchors actually play?
Your kubeconfig context authenticates with a client certificate. You run the command below. What does kubectl print, and where does the information come from?
A developer writes the event handler prop in lowercase, HTML-style: onclick instead of onClick. In a React development build, what happens when the user clicks Save?
4 November 2026 is a Wednesday. What two numbers does this code log?
What does this dict.popitem code print?
With `strict` enabled, which of the three assignments below compile?
What does this program print, iterating a range of char values?
Which kind of declaration is a valid target for a //go:embed directive in Go?
A hardware-testing job needs to set the system clock from inside a container. Even running as root, the command fails as shown. What explains this, and what is the minimal fix?
An admin-only metrics endpoint is meant to be reachable only from the office NAT IP (203.0.113.10). The Flask app is deployed directly on the public internet, with no trusted reverse proxy in front of it, and enforces the restriction with the code below. How can an attacker on the public internet reach /admin/metrics?
An inference team sizes the GPU memory budget for the KV cache of the decoder-only model configured below, serving a batch of 8 sequences that each hold a 4096-token context. Approximately how much memory does the full KV cache occupy?
Node node1 currently carries the taint dedicated=gpu:NoSchedule. You run the command below. Note the trailing dash after the effect. What does it do?
In a React 19 app, the context object itself is rendered as a JSX element with a value prop, with no .Provider. What does Toolbar display?
What does this code log, given how Array.prototype.fill handles object values?
What does this str.ljust / str.rjust code print?
`Cat` below is declared only as an interface. What does the compiler do with the `instanceof` check?
What does this program print, converting numbers to characters with char::from_digit?
What does this Go program print on Go 1.23 or later, given what slices.Repeat returns?
A deploy user's shell sets the umask below, then creates a file and a directory. What permissions do they get?
A team buys one certificate whose only Subject Alternative Name is the wildcard shown below and installs it on three HTTPS hosts. Which hostnames will a modern browser accept the certificate for without a name-mismatch error?
A training script counts optimizer steps with the loop below. The dataset has 10,000 samples, batch_size is 64 and drop_last is left at its default. What does it print?
Service api lives in namespace frontend and has the selector shown. Every Pod labeled app: api runs in namespace backend; namespace frontend has no Pods with that label. What endpoints does the Service get?
This component is written exactly as it would be in plain HTML, with the <img> tag left open. What happens when the project is compiled?
What three values does this typed-array precision code log?
What does this calendar module code print?
A project runs plain `tsc` with `strict` enabled and no other emit-related options. `app.ts` contains the type error below. What happens to the output file `app.js`?
What does this program print, building a Vec by chaining std::iter::once with other iterables?
What does this Go program print, given how maps.Copy (Go 1.21+) handles a key that already exists in the destination map?
A crontab line on a server set to UTC is shown below. When does the job run?
A marketplace lets sellers upload photos taken on their phones and serves the original files unchanged at public URLs using the handler below. A privacy review flags a serious risk to sellers who photograph items at home. What is it?
A demand-forecasting model is trained by minimizing the pinball (quantile) loss below with tau = 0.9 instead of mean-squared error. Given enough data and capacity, what does the model learn to predict for each input?
You apply the Pod below. Exactly one of its four labels violates Kubernetes label-value syntax, so the API server rejects the whole Pod. Which label is it?
useMemo is called here WITHOUT a dependency array. This is a production build with no StrictMode. Report mounts, then the user clicks the button three times (rows never changes). How many times is 'summing' logged in total?
What does this code log, given that the parameter list has a default value?
What does this __str__ / __repr__ code print, in order?
With `strict` enabled (TypeScript 4.4+), what does the compiler do with the two catch clauses below?
What does this program print, duplicating part of a vector with Vec::extend_from_within?
What does this Go program print, given how the strings package treats an empty substring or empty character set?
The DORA research program (popularised in the book Accelerate) defined four key metrics for measuring software delivery performance. Which set lists exactly those four?
A company's password policy forces every employee to change their password every 60 days and requires at least one uppercase letter, one digit and one symbol. Which change best aligns the policy with NIST SP 800-63B guidance for memorized secrets?
A RAG pipeline keeps returning five near-duplicate chunks from the same paragraph, so the team re-ranks the top candidates with Maximal Marginal Relevance (MMR) as below. What does the parameter lam control?
Namespace prod contains the four Pods listed below with their labels. You run the command shown. Which Pods does kubectl list?
A developer leaves a note inside the JSX using a JavaScript line comment. The component compiles and renders. What does the user actually see inside the <div>?
How many times does the callback run, and what does this code log?
What does this str.title() call print?
What does the compiler do with the function declaration below?
What does this program print, using u32::next_power_of_two and is_power_of_two?
What does this Go program print, given how encoding/hex formats bytes?
An engineer converts a batch worker into a Deployment and copies the pod template from an old Job, keeping its restart policy. What happens when they run `kubectl apply -f worker.yaml`?
A Node.js service hashes passwords with the call below. During a hardening review the team raises the bcrypt cost from 10 to 12 and asks how much slower each hash (and therefore each attacker guess against a stolen database) becomes. What is the correct answer?
An LLM server replaces top-p with min-p sampling, implemented as below with min_p = 0.1. How does the set of candidate tokens behave compared with a fixed cutoff?
You start the command below on your laptop, then hit the two URLs shown with plain curl - no client certificate, no bearer token - and both succeed. What is kubectl proxy actually doing?
The same characters, Tom & Jerry, appear twice: once as literal JSX text inside the <h1>, and once inside a JavaScript string that is rendered through braces in the <h2>. What does the user see in each heading?
What does this do...while loop log?
What do these str.isdecimal / isdigit / isnumeric calls print?
Your project enables `skipLibCheck`. Which statement describes what the compiler actually does?
What does this program print, probing a Vec with contains, starts_with and ends_with?
What does this Go program print, given how Go evaluates 1 / 3 versus 1.0 / 3?
`terraform init` has already been run. No AWS credentials are configured in this shell, and no subnet in the account is tagged `does-not-exist`. What does `terraform validate` report for this configuration?
Two directories on a Linux host are both world-writable, as shown. Each contains report.txt owned by root:root with mode 0644. The unprivileged user mallory tries to delete (unlink) or rename report.txt in each directory. What happens?
An image classifier trains fine, but its validation accuracy jumps around by more than a point between epochs and sits well below what the same checkpoint scores in production. The transform pipeline is below. What is actually wrong?
The Job below fails on every attempt and exhausts its backoffLimit. You run the kubectl wait command shown in a CI script. What does that command do?
Each radio is controlled by the same piece of state. The user clicks the PayPal radio once. What actually drives the selection here, and what is the shared name attribute doing?
What three values does this code log?
What does this print() code output, in order?
With `strict` enabled, what does the compiler do with the two declarations below?
What does this program print, mutating a String with remove, insert and insert_str?
What does this Go program print, given the three-index (full) slice expression base[1:3:3]?
A team runs a fleet of self-hosted CI runners in one VPC behind a single NAT gateway. Builds intermittently fail at the first image pull, as shown. The same build always succeeds on a developer laptop, and the image and tag exist. What is happening, and what is the correct fix?
A vulnerability report carries the CVSS v3.1 base vector below. A manager asks what the S:C metric is telling them. What does Scope: Changed actually mean?
Grad-CAM produces a class-discriminative heatmap for a trained CNN. Given the hook-based implementation below, what does it actually compute?
You are about to ship a change and want to see exactly what it would do to the live cluster first. You run the command below against a cluster that also has a mutating webhook injecting a sidecar. What does kubectl diff actually do, and what does it exit with?
Lamp and Fan both call the SAME custom hook, useToggle. The user clicks the lamp button exactly once. What do the two buttons display afterwards?
What does this code log?
What do these math module calls print?
Given the tsconfig below, `src/lib/db.ts` exports `connect`. What happens when you run `tsc` and then `node dist/app.js`?
On a Unix-like platform, what does this program print, joining paths with Path::join and inspecting a multi-dot file name? (the four output lines are shown separated by " / ")
What does this Go program print, given where strings.Cut splits and what it returns when the separator is absent?
An organization's only CloudTrail trail was created with the commands below and never modified afterwards. An attacker steals an IAM user's access key, enumerates the account, adds a second access key for persistence, reads an encrypted SSM parameter, and then downloads every object in the acme-reports bucket. Which of the attacker's actions leaves NO entry in that trail?
A linear model is fit on two features that are almost the same column. The fitted coefficients come out enormous and opposite in sign, yet R-squared is essentially identical to a fit on x1 alone. What is going on, and what does the Variance Inflation Factor measure?
What two lines does this code log?
You run the first command below on your laptop against a cluster whose current kubeconfig context is named kind-prod, then immediately run kubectl get pods. What changed, and which Pods are listed?
A co-working space upgrades its access point to WPA3-Personal but leaves WPA3/WPA2 transition mode enabled so older devices still connect, with the same passphrase used for both. The network team reports that members now get SAE's resistance to offline dictionary attacks. What can an attacker within radio range still do?
What does this Go program print, given what time.Time.Truncate rounds down to?
What does the compiler report for the two enum declarations below?
What three values, then what fourth line, does this code log?
You run the command below against the app.properties file shown. What keys does the resulting ConfigMap contain?
A health startup publishes a "de-identified" research extract. It drops the name, email and national-ID columns and replaces the internal patient id with a fresh random UUID per row; the mapping table stays in-house. Every published row still carries exact date of birth, 5-digit ZIP code, sex and diagnosis. Legal signs off because "no direct identifier remains". Why is that reasoning wrong?
What does this Go program print on its three lines, given how strconv.Quote and strconv.QuoteToASCII treat a printable non-ASCII rune?
With `strict` enabled, which of the four assignments below does the compiler reject?
What four values does this code log?
The Service below already exists in namespace shop and is serving traffic. You now create a second NodePort Service in a DIFFERENT namespace, analytics, whose port block also asks for nodePort: 30080. What does the API server do with the second Service?
A developer stores API credentials in a config file and, to "encrypt" them, wraps each value in Base64. They argue that even if the file leaks, the credentials are safe because they are "encrypted." Why is this reasoning wrong?
What does this Go program print, given how fallthrough behaves in an expression switch?
What is the inferred type of `n` below?
What string does this code log?
The CustomResourceDefinition below declares additionalPrinterColumns on its v1 version. What do these entries actually change?
A developer enables SSH agent forwarding so they can run `git clone git@github.com:...` directly on a shared build host. Other engineers hold root on that host. While the session is open, what can an attacker on the build host actually do?
Given the state of this Docker host, which of the listed objects does `docker system prune -f` actually delete?
With `strict` enabled on TypeScript 4.4+, what does the compiler do with `input.toFixed(1)` and `input.trim()` below?
What does this code log?
The image myapp:1.0 was built with ENTRYPOINT ["/app/server"] and CMD ["--port=8080"]. The Pod below sets args but no command. What process line does the container actually run?
A backend generates the link below so a customer can download an invoice. The bucket has S3 Block Public Access enabled and every object ACL is private. The developer pastes the resulting link into a shared support-ticket thread, arguing that "the bucket is private, so only the customer's browser can use it". What does that URL actually grant?
What does this Go program print, given how path.Join treats its elements?
With `strict` enabled, which of the three calls below does the compiler reject?
What three values does this code log?
The ResourceQuota below is applied to namespace team-a. What do these two entries actually limit?
A laptop boots with UEFI Secure Boot enabled, as shown. Malware that already has Administrator privileges tries to install a bootkit by replacing the bootloader, and the machine refuses to boot it. What does Secure Boot actually enforce, and what does it NOT protect against?
What does this Go program print, given how iota behaves across the const block?
What does this Go program print?
What does this code log to the console?
A container in Pod web has crashed and been restarted by the kubelet. You want to read the log output from the instance that crashed, not the one now running. Which command retrieves the logs of the previous, terminated container instance?
This Java EE security constraint requires the 'admin' role for /admin/*. An unauthenticated attacker retrieves a protected admin page by sending a request with a method that is NOT listed, such as HEAD. Why does the constraint fail to stop them?
What does this Go program print?
What does the following code log?
What does this code log to the console?
You run the command below as user `jane`. How does `kubectl auth can-i` actually produce its yes/no answer?
A team stores a database password in a Kubernetes Secret (below) and concludes it is now safely encrypted inside the cluster. A security reviewer disagrees. What is actually true about how this Secret is protected, and what fix is required?
What does this Go program print?
Using the built-in `ThisParameterType` utility type below, what is the resolved type of `T`?
What does this code log to the console?
A container defines the preStop lifecycle hook below. Its image is built FROM scratch (no shell, no coreutils). What does this hook do, and will it work?
On an Ethernet LAN with no switch-level protections, an attacker connects a machine running its own DHCP server. It races the legitimate server to answer clients' broadcast DHCPDISCOVER messages and hands out a lease whose default gateway and DNS server point to the attacker's host, so victim traffic flows through the attacker. Why does this succeed, and which switch feature most directly prevents it?
What does this program print?
Given the class union below, what does the TypeScript compiler do with animal.bark() and animal.meow()?
What does this code log to the console?
A Job is created with the pod template below, which sets restartPolicy: Always. What happens when you apply it?
On a switched Ethernet LAN, an attacker on the same subnet repeatedly sends unsolicited ARP replies mapping the default gateway's IP to the attacker's own MAC address. Victim hosts update their ARP caches and start sending gateway-bound traffic to the attacker, who forwards it. What makes this attack possible?
What does this Go program print?
What is the resolved type of `x` below?
What does this code log to the console?
A container sets securityContext.readOnlyRootFilesystem: true, as shown. Its process needs to write temporary files to /tmp. What is the effect of this setting, and what must you add for the writes to succeed?