Skip to content

Instantly share code, notes, and snippets.

View realgio95's full-sized avatar

Giovanni HoSang realgio95

View GitHub Profile
@realgio95
realgio95 / factorialize.js
Created March 3, 2018 16:05
YaadCode - Live FreeCode Camp Coding Sessions
/*
Sign up for YaadCode - Live FreeCode Coamp Coding Sessions Twice Weekly on Skype
You may join the FreeCodeCamp, Kingston Group here: https://www.facebook.com/groups/free.code.camp.kingston.jamaica/
https://www.freecodecamp.org/challenges/factorialize-a-number
*/
function factorialize(num) {
if (num ==1 ){
return 1;
}
@realgio95
realgio95 / ReverseString.js
Last active March 3, 2018 16:05
YaadCode: FreeCodeCamp Live Coding Sessions Challenges
/*
Sign up for YaadCode - Live FreeCode Camp Coding Sessions Twice Weekly on Skype
You may join the FreeCodeCamp, Kingston Group here: https://www.facebook.com/groups/free.code.camp.kingston.jamaica/
https://www.freecodecamp.org/challenges/reverse-a-string
*/
function reverseString(str) {
var chars = str.split("");
chars.reverse();
newStr = chars.join("");
return newStr;
#include<cmath>
#include<iostream>
#include<climits>
using namespace std;
int Maximum_Sum_Subarray(int arr[],int n) //Overall Time Complexity O(n)
{
int ans = A[0],sum = 0;
for(int i = 1;i < n; ++i) //Check if all are negative
ans = max(ans,arr[i]);
@realgio95
realgio95 / PreorderInorderPostorder_CPP.cpp
Created December 11, 2015 12:00 — forked from mycodeschool/PreorderInorderPostorder_CPP.cpp
Binary tree traversal: Preorder, Inorder, Postorder
/* Binary Tree Traversal - Preorder, Inorder, Postorder */
#include<iostream>
using namespace std;
struct Node {
char data;
struct Node *left;
struct Node *right;
};