This is by no means an exhaustive list. Checkout the project on github to get an idea of popularity and how maintained it is.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// O(n + n + n/2) | |
// O(2n + n/2) | |
// O(2.5n) | |
// O(n) | |
public boolean isPalindrome(String input) { | |
// replaceAll - n times | |
input = input.replaceAll("\\s",""); | |
// replaceAll - n times | |
int n = input.length(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// run from the command line with: | |
// javac PalindromeTester.java && java PalindromeTester | |
public class PalindromeTester { | |
public boolean isPalindrome(String input) { | |
// your code here | |
return false; | |
} | |
PluralSight John Papa Course:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Car { | |
public int miles = 0; | |
public int miles() { | |
return 12; | |
} | |
public static void main(String[] args){ | |
Car car = new Car(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Galvanize | |
{ | |
abstract class Animal | |
{ | |
public abstract string poop(); | |
} | |
class Dog : Animal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mergeSort(arr) { | |
// | |
// If your array has a length less than 2, congratulations! It's already sorted. | |
if(arr.length < 2) { | |
return arr; | |
} | |
// Otherwise, cut your array in half, and consider the two sub-arrays separately. | |
var firstLength = arr.length / 2; | |
var firstHalf = arr.slice(0, firstLength); | |
console.log('firstLength', firstLength); |