Giter Club home page Giter Club logo

bubble-sort's Introduction

Welcome to Niko's profile!

nikoescobal

nikoescobal

nikoescobal

  • ๐Ÿ”ญ Iโ€™m currently working on Building my own habits tracker

  • ๐ŸŒฑ Iโ€™m currently learning Flutter

  • ๐Ÿ‘ฏ Iโ€™m looking to collaborate on anything interesting

  • ๐Ÿค Iโ€™m looking for help with Landing more freelance gigs

  • ๐Ÿ‘จโ€๐Ÿ’ป All of my projects are available at https://github.com/nikoescobal

  • ๐Ÿ“ I regularly write articles on https://nikoescobal.medium.com/

  • ๐Ÿ’ฌ Ask me about React, Rails, and sad instrumental music

  • ๐Ÿ“ซ How to reach me [email protected]

  • ๐Ÿ“„ Learn about about my experiencess and check out my works at my personal website.

  • โšก Fun fact - I make music in my free time. And I absolutely love ๐Ÿฃ and ๐Ÿœ

Professional ๐Ÿ‘”:

โญ Remote Pair-Programming, Teamwork, Startups, Mentoring

Connect with me:

nikoescobal nikoescobal nikolas-escobal 14147901 @nikoescobal

Languages | Libraries | Frameworks:

babel bootstrap css3 figma git heroku html5 javascript jest mysql nodejs postgresql postman rails react redux ruby sass sqlite tailwind webpack

Tools & Methods ๐Ÿ› ๏ธ :

โ›๏ธ Git, GitHub, Mobile/Responsive Development, Chrome Dev Tools, VS Code, Slack

Professional ๐Ÿ‘”:

โญ Remote Pair-Programming, Teamwork, Startups, Mentoring

nikoescobal

ย nikoescobal

nikoescobal

โœ๏ธ Latest Blog posts

bubble-sort's People

Contributors

nikoescobal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

bubble-sort's Issues

Something to improve upon

Awesome job on this one man. There's one thing you can improve:

Bubble-Sort/bs-4.rb

Lines 6 to 10 in 82df761

if array[y + 1] != nil
if array[y] > array[y + 1]
array[y], array[y + 1] = array[y + 1], array[y]
end
end

You don't need a nested if-statement here. Try to reduce it to fewer lines.

Push needed files

I'm not sure which code I'm supposed to be looking at. My suggestions are to remove the files that don't need to be here (makes the repo much cleaner) or rename the files that I need to look at to appropriate names ๐Ÿ‘Œ

bubble sort by

Bubble-Sort/bsb-1.rb

Lines 18 to 22 in 30188c0

while y < self.length
if self[y] < self[z]
self[y], self[z] = self[z], self[y]
end
end

  1. If you're only using one loop or block, then you're only iterating through the array once. That won't produce a sorted array.
  2. The number of block variables that you pass through the pipe, should be equal to the number of variables (or objects) that need to be yielded.
  3. A clue of what needs to be yielded lies with what's being passed through the block variable; what are the functions of the left and right variables?
  4. What are the y and z variables? You're using them but they're nil objects.

You're on the right path. Keep up the good work, duderino.

Improvement for 4.5

Once again, you've done an awesome job, but you can also reduce the nested if-statements.

Bubble-Sort/bs-4.5.rb

Lines 7 to 13 in 82df761

if !array[z + 1].nil?
if array[z + 1] < array[z] # if 10 < 200
temp = array[z] # temp is array[z], which is 200
array[z] = array[z + 1] # array[z], which is 200, is now array[z + 1], which is 10
array[z + 1] = temp # array[z + 1], which was 10, is now 200
end
end

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.