0% found this document useful (0 votes)
2 views1 page

Data Structures & Algorithms Guide

Uploaded by

r86308281
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Data Structures & Algorithms Guide

Uploaded by

r86308281
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Data Structures and Algorithms

 Matrix Manipulation: Given a matrix, rotate it 90 degrees clockwise.


 String Manipulation: Implement a function to check if two strings are anagrams.
 Permutations: Find all permutations of a given string using recursion.
 Array Problems:
o Find the element that appears an odd number of times in an array where all other elements appear an
even number of times.

o Sort an array where the risk values range from 0 to 2 (a form of counting sort).

Dynamic Programming
 0/1 Knapsack: Solve the 0/1 Knapsack problem using dynamic programming.
Control Flow and Logic
 Loop Control: Analyze the output of a for loop that uses continue and break statements to
determine how many times a string will be printed.

 Matrix Traversal: Given a matrix representing a parking lot, find the row with the most occupied
spaces.
String and Array Logic
 String Balance: Given a string of asterisks and hashes, calculate the minimum number of changes to
make the count of hashes equal to the count of asterisks.

 Sliding Window: Find the length of the longest continuous sequence of horses on which a bet can be
made without exceeding a certain cost.

You might also like