Please vidit my Yoututbe channel to learn Algoritms and Ds which helps for interviews and daily coding life.
https://www.youtube.com/channel/UCn1XnDWhsLS5URXTi5wtFTA?app=desktop
Source code for youtube videos
Please vidit my Yoututbe channel to learn Algoritms and Ds which helps for interviews and daily coding life.
https://www.youtube.com/channel/UCn1XnDWhsLS5URXTi5wtFTA?app=desktop
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]]
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 ↘ ↗ →
:)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.