GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - nanoman657/matrix-coding-challenge

BranchesTags
Open more actions menu

Latest commit

 

History

10 Commits
10 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
README.md
README.md
 
 
submission.py
submission.py
 
 

Repository files navigation

Coding-challenge

Write a function that takes a 2-dimensional array of integers as well as a distance threshold (I'll call it n), and returns the number of cells in the array that are within n steps of a positive value. Here "steps" means just up/down/left/right steps in the grid (but you can take a step one direction and then the next step in a different direction). By way of example, consider the following grid:

[ [ 0, 0, 0, 0, 0 ], [ 0, 0, 1, 0, 0 ], [ 0, 0, 1, 0, 0 ] ]

If we are given that grid, and the value n=1, the answer should be 7: [ [ 0, 0, X, 0, 0 ], [ 0, X, X, X, 0], [ 0, X, X, X, 0] ]

About

No description, website, or topics provided.

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.