Die meistgefragten Interviewfragen und Antworten sowie Online-Tests
Lernplattform fur Interviewvorbereitung, Online-Tests, Tutorials und Live-Ubungen

Baue deine Fahigkeiten mit fokussierten Lernpfaden, Probetests und interviewreifem Inhalt aus.

WithoutBook vereint themenbezogene Interviewfragen, Online-Ubungstests, Tutorials und Vergleichsleitfaden in einem responsiven Lernbereich.

Interview vorbereiten

Probeprufungen

Als Startseite festlegen

Diese Seite als Lesezeichen speichern

E-Mail-Adresse abonnieren

Dynamic Programming Interviewfragen und Antworten

Frage 21. Maximum Profit with K Transactions

Given an array representing stock prices, find the maximum profit that can be obtained with at most k transactions.

Example:

Input: [3, 2, 6, 5, 0, 3], k = 2, Output: 7

Ist das hilfreich? Kommentar hinzufugen Kommentare ansehen
 

Frage 22. Count Distinct Subsequences

Given a string, find the number of distinct non-empty subsequences of the string.

Example:

Input: "abc", Output: 7 ("a", "b", "c", "ab", "ac", "bc", "abc")

Ist das hilfreich? Kommentar hinzufugen Kommentare ansehen
 

Frage 23. Palindromic Substrings

Given a string, find the total number of palindromic substrings.

Example:

Input: "abc", Output: 3 ("a", "b", "c")

Ist das hilfreich? Kommentar hinzufugen Kommentare ansehen
 

Frage 24. Minimum Cost Path

Given a 2D grid, find the minimum cost path from the top-left corner to the bottom-right corner.

Example:

Grid: [[1,3,1],[1,5,1],[4,2,1]], Output: 7 (1 -> 3 -> 1 -> 1 -> 1)

Ist das hilfreich? Kommentar hinzufugen Kommentare ansehen
 

Frage 25. Word Break II

Given a non-empty string and a dictionary of words, return all possible sentences formed by concatenating words from the dictionary.

Example:

Input: s = "catsanddog", wordDict = ["cat", "cats", "and", "sand", "dog"], Output: ["cats and dog", "cat sand dog"]

Ist das hilfreich? Kommentar hinzufugen Kommentare ansehen
 

Am hilfreichsten laut Nutzern:

Copyright © 2026, WithoutBook.