Git Product home page Git Product logo

problemvalgorithm's Introduction

Problem.V.Algorithm

Square Root

Used a binary search type of algorithm to find the Square Root for perfect Squares or floored Square Root for non perfect Squares in O(log n) time with O(1) space complexity.

Rotated Array Search

Utilized a pivot search and binary search to find an element in a rotated Array with a worst case of Big O (log n). Space complexity would be O(1) as search is done in place.

Rearrage Array Digits

Utilized Merge Sort Algorithm to sort a list of digits and combine them into two numbers that would combine to the largest sum. This mergeSort based algorithm would have an O(n log n) time complexity and a O(n) space complexity.

Sort 012

Sorted an array with only three possible values in O(n) time and O(n) space complexity with an inplace sort.

AutoComplete Trie

Built a Trie structure to hold words used to autocomplete words bassed on a prefix that would return all words as a list. Space complexity is O(n * w) in the worst case where n is the number of letter and w is the number of words. The time complexity in this implemenation is O(n) where n is is the length of the word for finding inserting etc.

Get Min and Max

A simple trasversal algorith to find the smallest and largest element utilizing O(n) time and O(1) space.

Request Routing

Utilizing a Trie structure this class holds the folder structure and handlers(files) associated with a web server. The algorithm calls have a O(n) time complexity and a O(n) space complexity.

problemvalgorithm's People

Contributors

chrisweilacker 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.