Available question text
Given positions of multiple black queens and one white king on an 8x8 board, return the queens that can directly attack the king — i.e., the nearest queen (if any) along each of the eight straight or diagonal directions from the king with no pieces in between. This reduces to scanning the eight rays from the king and selecting the first queen encountered in each direction.
Related questions
Continue with questions that share topics or the same question type.
- All Valid Triplets That Can Represent a Country
Coding
- Coding test: Given a simple mockup implement that UI. Some CSS is already provided and an API to fetch the data also exists. The recruiter prep doc talked about structuring the code well, making sure all functions work, write CSS and write tests. There is no way you can do it all in 1 hour, so it's probably best to ask the interviewer what they expect
Coding
- Count Artifacts That Can Be Extracted
Coding
- Count Paths That Can Form a Palindrome in a Tree
Coding · Bit Manipulation · Depth-First Search · Hash Table
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1222. Queens That Can Attack the King
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source