3278 Find The Number Of Ways To Place People I
Find the Number of Ways to Place People I You are given a 2D array points of size n x 2 representing integer coordinates of some points on a 2D plane, where points[i] = [xi, yi]. Count the numbe...
Find the Number of Ways to Place People I You are given a 2D array points of size n x 2 representing integer coordinates of some points on a 2D plane, where points[i] = [xi, yi]. Count the numbe...
Maximum Average Pass Ratio There is a school that has classes of students and each class will be having a final exam. You are given a 2D integer array classes, where classes[i] = [passi, totali]....
Sudoku Solver Write a program to solve a Sudoku puzzle by filling the empty cells. A sudoku solution must satisfy all of the following rules: Each of the digits 1-9 must occur exactly once in e...
Valid Sudoku Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules: Each row must contain the digits 1-9 without repetition. Eac...
Alice and Bob Playing Flower Game Alice and Bob are playing a turn-based game on a field, with two lanes of flowers between them. There are x flowers in the first lane between Alice and Bob, and ...
File I/O 6 types of files. 4 types of file syscall open read write close A program to copy a file #include <stdio.h> #include <fcntl.h&g...
Sort Matrix by Diagonals You are given an n x n square matrix of integers grid. Return the matrix such that: The diagonals in the **bottom-left triangle** (including the middle diagonal) are sor...
System Calls Will always switch to Kernel mode Syscall number is fixed but user identify it by syscall func name. How sys call works When userspace programs call syscall, then they stor...
Maximum Area of Longest Diagonal Rectangle You are given a 2D **0-indexed **integer array dimensions. For all indices i, 0 <= i < dimensions.length, dimensions[i][0] represents the length ...
Diagonal Traverse Given an m x n matrix mat, return an array of all the elements of the array in a diagonal order. Example 1: **Input:** mat = [[1,2,3],[4,5,6],[7,8,9]] **Output:** [1,2,4,...