Available question text
Count how many permutations of 1..n satisfy that for every position i the placed value and i are "self-divisible" (e.g., the value divides i or i divides the value). This requires exploring combinatorial assignments efficiently—typically via backtracking with pruning or bitmask DP—because n is small but the search space is factorial.
Related questions
Continue with questions that share topics or the same question type.
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 2992. Number of Self-Divisible Permutations
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source