LearnYard - Free Programming & DSA Blogs | Read, Code, Excel
  • C++ Course
  • DSA Course
  • Online Assessment DSA Questions
  • DSA for Frontend Interview
  • Frontend Interview Experience
  • Low Level Design
  • High Level Design
  • Java Course
  • About
  • Feedback
Sign in Subscribe

Md Kamran

Queens That Can Attack The King

Problem Description On a 0-indexed 8 x 8 chessboard, there can be multiple black queens and one white king. You are given a 2D integer array queens where queens[i] = [x_Queeni, y_Queeni] represents the position of the ith black queen on the chessboard. You are also given an
16 Aug 2023 10 min read

Check if Matrix is X-Matrix

Problem Description A square matrix is said to be an X-Matrix if both of the following conditions hold: 1. All the elements in the diagonals of the matrix are non-zero. 2. All other elements are 0. Given a 2D integer array grid of size n x n representing a square
15 Aug 2023 11 min read
← Newer Posts Page 4 of 4
LearnYard - Free Programming & DSA Blogs | Read, Code, Excel © 2026
Powered by Ghost