Skip to content

Comments

cc22 quickSort √#83

Open
mixelpixel wants to merge 557 commits intobloominstituteoftechnology:masterfrom
mixelpixel:master
Open

cc22 quickSort √#83
mixelpixel wants to merge 557 commits intobloominstituteoftechnology:masterfrom
mixelpixel:master

Conversation

@mixelpixel
Copy link

@mixelpixel mixelpixel commented Jul 28, 2017

cc15: bubblesSort BigO

  • with the for loop, I think this has for the worst case scenario, a linear progression, but I am not sure.
  • Does the recursive call make it quadratic?

@mixelpixel mixelpixel force-pushed the master branch 2 times, most recently from 9504ef9 to 711d964 Compare July 28, 2017 16:52
@mixelpixel
Copy link
Author

Plz help re: my solution to queueStack.

  1. I used a "setter" method for Stack.add(item)
  • queueStack.js: line 11: set add(anItem) { this.storage.push(anItem) }
  1. when I call this add method in the Queue class, I get an error "add is not a function"
  • queueStack.js: line 29: this.output.add(this.input.remove());
  1. Question:
  • Is this a limitation of JS setters/getters?
  • Is my implementation incorrect?

Thanks!

@mixelpixel mixelpixel changed the title cc15 bubbleSort √ cc19 logicGates √ Aug 3, 2017
Copy link
Contributor

@ryan-hamblin ryan-hamblin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep it up buddy.

let firstLetter = str[i];
let restOfString = str.slice(0, i) + str.slice(i + 1, str.length);

for (let sub of allAnagrams(restOfString)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NICE! I love for of loops. They just make things so easy. But you're iterable is a freaking recursive call. Noice.

@mixelpixel mixelpixel changed the title cc19 logicGates √ cc22 quickSort √ Aug 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants