Coder Social home page Coder Social logo

spring1843 / go-dsa Goto Github PK

View Code? Open in Web Editor NEW
534.0 4.0 149.0 427 KB

Go Data Structures and Algorithms is an open source tool for learning and rehearsing data structures and algorithms in Go.

License: Apache License 2.0

Go 99.80% Makefile 0.20%
algorithms data-structures golang divide-and-conquer dynamic-programming greedy-algorithms programming-challenges puzzles recursion learning

go-dsa's Introduction

Data Structures and Algorithms in Go 🚀

tests GitHub License Go Report Card Coverage Report Go Reference

Welcome to Data Structures and Algorithms in Go! 🎉 This project is designed as a dynamic, hands-on resource for learning and practicing data structures and algorithms in the Go programming language.

  • More than one hundred rehearsal problems, at least six problems for each of the fifteen topics
  • Executable and comes with 100% test coverage, ensuring correctness and quality
  • Completely free, community-editable, and continuously evolving
  • Ability to study and practice in your favorite IDE, editor, or web browser

Random Challenge

📚 Table of Contents

📋 Outline

All topics are discussed in README.md files in the corresponding directory. Each topic includes the following sections:

  • 💡 Implementation: Overview of implementing the data structure or algorithm in Go.
  • 📊 Complexity: Analysis of the time and space complexity of the data structure or algorithm.
  • 🎯 Application: Discuss problems commonly solved using the data structure or algorithm.
  • 📝 Rehearsal: Practice problems with links to tests that provide 100% coverage and example inputs and outputs.

go-dsa's People

Contributors

spring1843 avatar shrinivaskane avatar haroonalbar avatar cs-hassan-ali avatar jaidensiu avatar imajeetyadav avatar kobypierce avatar ytcalifax avatar

Stargazers

carlos avatar Jacob George avatar Fabricio Parola avatar  avatar Keith Thomson avatar Krishna Agarwal avatar Varun Mathiyalagan avatar Socret Lee avatar Timothée avatar Farmaan Malik avatar Adriano Fonseca avatar Dhrutinandan Swain avatar Sabiq Aijaz avatar Samuel avatar CandiedUniverse avatar Ajesh S avatar Rokibul Hasan Rokib avatar Dhruvgiri Goswami avatar Martin Le avatar Samuel Volder avatar artur avatar  avatar Felix avatar seva dalnev avatar Nguyễn Văn Dũng avatar zeyad sleem avatar Prashant Bhardwaj avatar Constantine Chuprik avatar Mikhail Dronov avatar Dixon Whitmire avatar Prosper Ugbovo avatar Amir Bravostack avatar Thomas Kniep avatar Reza Khanipour avatar Daniel Crigan avatar Ardhani avatar Carlos Moreno  avatar Diego avatar Jonathan avatar  avatar Cecilia avatar Kenan Omić avatar Reaulo avatar Yi-Tong Tao avatar  avatar Huseyn Zeynalov avatar Mohit Singh Panwar avatar Marko Vidaković avatar Özgür avatar Dennis Dollée avatar  avatar Abdullah avatar  avatar David Madden avatar  avatar Harshit Singh avatar Irakli Gabisonia avatar Ravi Yadav avatar  avatar Arnaud Endignous avatar Ali Khakshoor avatar ChrisMwiti avatar Lance Moncis avatar  avatar Arpit Garg avatar Siva Varma avatar Christian Ndu avatar TheAlpahHydrogen avatar Aditya Poddar avatar Trần Phước Anh Quốc avatar Gaurav mishra avatar mirko avatar MIMANSHU MAHESHWARI avatar Lukas Klippel avatar Victor Pierre avatar Ben Watkins avatar Blaize Kaye avatar Vatsal Prajapati avatar  avatar Adarsh Saxena avatar A.H.M. ANNUR avatar Abasifreke Ekwere avatar  avatar Avukonke Peter avatar Darsh Shah avatar Ivan A. avatar Ilango avatar Joseph Bassey avatar Devin Ersoy avatar Yashvardhan avatar Michael Amadi avatar Jesse Raymond avatar Daron avatar Godsend Joseph avatar Jeann Porfírio avatar SQRK!D avatar Kevin Deason avatar Rohit Kalyan Kandulapati avatar Mutwiri Ian  avatar Jeremy Kwagh avatar

Watchers

 avatar Roshan Paturkar avatar Paweł Polski avatar  avatar

go-dsa's Issues

Solution to product_of_all_other_elements.go is not in O(n)

I could be being really stupid. If so please correct me.

I believe that it's impossible to solve product_of_all_other_elements without either using division or going beyond the O(n) requirement.

The solution given in product_of_all_other_elements.go is basically O(2n) which goes against your requirements.

Am I wrong?

Why is the space complexity O(1)?

Describe the problem

In zero-sum triplets solution it says it's O(1) space complexity is that correct?

Expected behavior

There is memory allocation going on for output. So what would be the actual space complexity?

Wrong space complexity

Describe the problem

In the file array/product_of_all_other_elements.go - Line 9 - You initialised an array of length n.
Doesn't it make space complexity O(N). But you have written it O(1) in Line 3.

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.