Giter Club home page Giter Club logo

widebot-task1's Introduction

WideBot-Task1:

Using this dictionary, implement a spell checker class that takes this dictionary as input, this class has three main operations: • Store this dictionary in a suitable data structure. • Take an input word and return the nearest 4 words if this word is not in the dictionary • Take an input word and add this word to the dictionary For each operation specify the time and space complexity Note: You could assume that the nearest 4 words from a word are the 2 words before and after this word in lexicographic order if they exist.

Why Binary tree:

1)Efficient Lookup: Bintrees provide fast lookup time for words in the dictionary. Since it uses binary search tree-based data structures, the time complexity for lookup (searching for a word) is O(log n) 2)Sorted Order: Bintrees naturally maintain words in sorted order, making it easy to find nearest words before and after a given word. 3)Memory Efficiency: Bintrees can be more memory-efficient compared to some other data structures like hash tables since they do not require a fixed-size array for storing elements

widebot-task1's People

Contributors

ahmedhossamelhamamy avatar

Watchers

 avatar

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.