You are on page 1of 1

Database: courses_c, Table: cquestions, Purpose: Dumping data

qid
qid questions questions qtitles qtitles topi
topi
ss cc
342 <pre> Longest Subarray hard
Longest Subarray with Sum K: Given an array of integers and a target sum K,
find the length of the longest subarray with a sum equal to K. The elements of the array can be both positive and negative.
</pre>
343 <pre> Matrix Spiral Traversal hard
Matrix Spiral Traversal: Given an NxM matrix, print its elements in spiral order.
For example, given the following 3x3 matrix:

1 2 3
4 5 6
7 8 9

</pre>
344 <pre>Counting Inversions: Given an array of integers, find the number of inversions in the array. Counting Inversions hard
An inversion occurs when two elements in the array are out of their natural order.
For example, in the array [2, 4, 1, 3, 5], there are three inversions: (2, 1), (4, 1), and (4, 3).
</pre>
345 <pre> Maximum Sum Subarray hard
Maximum Sum Subarray (Circular): Given an array of integers,
find the maximum possible sum of a contiguous subarray when the array can be treated as a circular array.
For example, in the array [5, -3, 5], the maximum sum is 10 (5 + 5), considering the circular property.
</pre>
346 <pre> Longest Common Subsequence hard
Longest Common Subsequence: Given two sequences, find the length of the longest common subsequence (LCS).
A subsequence is a sequence that appears in the same relative order but not necessarily contiguous.
For example, the LCS of "ABCD" and "ACDF" is "ACD" with a length of 3.
</pre>
347 <pre> Find Peak Element hard
Find Peak Element: Given an array of integers, find a peak element, which is an element that is greater than or equal to its neighbors.
For example, in the array [1, 3, 5, 2, 6], both 5 and 6 are peak elements.
</pre>
348 <pre> Word Search hard
Word Search: Given a 2D board of letters and a word, determine if the word exists in the grid.
The word can be constructed from letters of adjacent cells (horizontally or vertically).
For example, given the board:
[ ['A','B','C','E'],
['S','F','C','S'],
['A','D','E','E']
]

The word "ABCCED" exists in the board, but "SEE" does not.
</pre>
349 <pre> Rat in a Maze hard
Rat in a Maze: Given a 2D matrix representing a maze, find a path for a rat to reach its destination (bottom-right corner) from the top-left corner.

The rat can move in four directions: up, down, left, and right. 0's in the matrix represent a valid path, while 1's represent obstacles. The output should be the path taken by the
rat.
</pre>
350 <pre>Count Islands: Given a 2D matrix representing a map, where 0's represent water and 1's represent land, count the number of islands in the map. Count Islands hard
An island is formed by connecting adjacent lands (horizontally or vertically). Assume that the borders of the map are all water. For example:
Input:
[
[1, 1, 0, 0, 0],
[1, 1, 0, 1, 1],
[0, 0, 0, 1, 1],
[0, 0, 0, 0, 0],
[1, 1, 0, 0, 0]
]
Output: 3 (Three islands are present in the map)
</pre>

Powered by TCPDF (www.tcpdf.org) Page number: 2/2 Aug 01, 2023 at 03:44 AM

You might also like