Jump to content

Kindly help

Featured Replies

Let G be an n×n grid whose edges are labelled with natural numbers. Starting in the top-left corner, consider paths in G reaching the bottom-right corner by walking along edges either down or to the right. The weight of a path is the sum over all numbers encountered along the edges it traverses. Devise an algorithm in pseudo-code that computes the set of all weights of all paths reaching the bottom-right corner (you may assume standard set data structures and operations on them to be available). Give a rough estimation of the running time of your algorithm: is it polynomial, exponential, etc.? Justify your answer.

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.