2

This kind of problem can be approached by using branch & bound techniques. In short the search space forms a tree, which can be traversed by a depth-first search, or breadth-first search, or a combined approach (see Wikipedia, tree traversal) each level of the tree represents one of the entries in the planting row at the top of the tree, there are 11 ...


2

One way to use recursion would be a product search function, using a simple Binary Search Tree or something similar to store the data. https://en.wikipedia.org/wiki/Binary_search_tree Adding, removing, and modifying inventory items would be fairly simple and something commonly covered in a Data Structures class. As far as using a queue, you could build a ...


2

An inventory system doesn't seem to offer a lot of opportunities for this kind of thing. If you are doing this for work, I would agree with amon that trying to force in such a solution is not really a great idea. It will devalue the solution that you are producing. Recursion can come with some performance penalties as well, depending on a number of ...


1

If I understand properly, the way this problem is structured allows it to be solved by building a directed graph and determining whether there is any path that includes all nodes without repeating any node. I've gone ahead and drawn an (ugly) drawing of the friend graph: I haven't checked but I think there probably is at least one such path. Given that, ...


1

In practice you wouldn’t sort 300 tasks just by priority. Tasks are related or unrelated. It is usually more efficient to handle related than unrelated tasks. So you would want to perform related tasks together. Also to have some subject handled completely instead of random bits and pieces. This is much better handled manually.


1

The algorithm should reduce the number of comparisons, but also the access time: when the user discovers a task, it takes time for him to read it and recover the memory he has about that task. So when the user has selected the most important of two tasks, you may keep the winning task for the next round. A benefit of this method is that the most important ...


Only top voted, non community-wiki answers of a minimum length are eligible