The tag has no wiki summary.

learn more… | top users | synonyms

-2
votes
0answers
16 views

What's time complexity of this algorithm for “Work Break”? [duplicate]

Word Break(Dynamic Programming) Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all such possible ...
1
vote
1answer
42 views

Generating hard puzzles for a backtracking snake

Let $M$ be a matrix of height $h$ and width $w$. Each entry of $M$ is an integer. There is a snake that starts from the "left side" of $M$, and its goal is to reach the "right side" of $M$. To get ...
0
votes
1answer
53 views

Find all non-decreasing sequences given lenght and size [closed]

I'm trying to find a solution for this exercise: Give the pseudocode of an algorithm which takes two positive integers n and k and prints all the non-decreasing sequences of length k ...
1
vote
1answer
413 views

Backtracking for listing k elements

Can someone give me a hand here, I am new to backtracking, and preparing for an interview. I couldn't even attempt this question, please help. Describe a back tracking algorithm for efficiently ...
1
vote
1answer
251 views

Why does backtracking work the way it does?

I just recently started learning in a CS context (as opposed to a programming context) about simple recursive functions, along with the combinatorial applications, and techniques such as Backtracking ...