Giter Site home page Giter Site logo

techdummies's Introduction

techdummies's People

Stargazers

 avatar Wilson Marcílio Júnior avatar Thiago da Silva avatar Suresh K avatar Aishwarya Anand avatar JYOTIRMOY MONDAL avatar Deep Nirmal avatar Kyle Jones avatar  avatar Deepak Muley avatar Kiran avatar David W avatar

Watchers

Narendra L avatar James Cloos avatar Raghul Christus avatar

techdummies's Issues

floodfill.py - typo in neighbours function

Instead of:
def neighbours(r, c):
"""Calculates the neighbours of a given cell"""
return [[r+1, c], [r+1, c], [r-1, c], [r, c-1],
[r+1, c+1], [r+1, c-1], [r-1, c-1], [r-1, c+1]]

It should be:
def neighbours(r, c):
"""Calculates the neighbours of a given cell"""
return [[r+1, c], [r, c+1], [r-1, c], [r, c-1],
[r+1, c+1], [r+1, c-1], [r-1, c-1], [r-1, c+1]]

Corner case of a valid Trie sub-branch not printed

The code only sets isValid on sub-paths longer that the current path which is not always true. This will not work as isValid won't be set for words that are prefix's of the current sub-path.

Example:
If you reverse the sample input to have `cats` first and then the word `cat`, following will be the incorrect output:
Found "cats" directions from (0,0)(c) go  ↘ ↗ →
Found "cats" directions from (0,0)(c) go  ↘ ↗ →

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.