Enrol to start learning
Reading is open to everyone. Enrolling is free, and it is what unlocks the audio lessons, practice tests and progress tracking.
4.3.1. Case When Characters Match
This section
Practice test
12 questions on this section. Wrong answers show you what to read again.
Sign up to take itWhole chapter
Revision test
Mixed questions from across the chapter. Your answers get marked.
Sign up to take itQuick
Flashcard drill
4 cards from this lesson. Good the night before a test.
Try these first
- 1.
Define what a subsequence is.
Hint
Think about the letters in a word.
- 2.
What does LCS stand for?
Hint
It's a term frequently used in programming and data analysis.
- 3.
What is the time complexity of the naive LCS solution?
- O(m*n)
- O(m+n)
- O(m^2+n^2)
Hint
Think about how many combinations you’re checking.
- 4.
Is a subsequence required to maintain the order of characters?
- True
- False
Hint
Reflect on how you can form sequences from words.
- 5.
Given two strings 'ABC' and 'AC', determine the LCS and demonstrate the steps taken during the computation.
Hint
Map out how characters align in the strings.
- 6.
Implement a simple algorithm using dynamic programming to compute the LCS for two strings provided in an input.
Hint
Visualize filling the matrix as you compare each character.
Exercises
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
4 more questions available
Enrol freeQuiz
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
2 more questions available
Enrol freeChallenge Problems
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting