Skip to content

Instantly share code, notes, and snippets.

View tylersloeper's full-sized avatar

Tyler L. tylersloeper

View GitHub Profile
@tylersloeper
tylersloeper / hackerrank.com Queues A Tale of Two Stacks in; C#
Last active February 20, 2017 03:31
hackerrank.com Queues A Tale of Two Stacks in; C#
/**
The challenge:
https://www.hackerrank.com/challenges/ctci-queue-using-two-stacks
**/
using System;
using System.Collections.Generic;
using System.IO;
class Solution {
static void Main(String[] args)
@tylersloeper
tylersloeper / Stacks: Balanced Brackets Challenge in C
Last active December 24, 2016 20:11
hackerrank Stacks: Balanced Brackets (in C)
/**
The challenge:
https://www.hackerrank.com/challenges/ctci-balanced-brackets
**/
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
@tylersloeper
tylersloeper / speller.c
Created December 3, 2016 06:59
CS50 Pset05 (1 part)
/**
* speller.c
*
* Computer Science 50
* Problem Set 5
*
* Implements a spell-checker.
*/
#include <ctype.h>
@tylersloeper
tylersloeper / resize.c
Created December 3, 2016 06:53
CS50 Pset04 (2 parts)
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include "bmp.h"
int main(int argc, char* argv[])
{
// ensure proper usage
@tylersloeper
tylersloeper / Strings: Making Anagrams in c
Last active December 28, 2016 08:21
Hacker Rank: Strings: Making Anagrams, (in c)
/**
The challenge:
https://www.hackerrank.com/challenges/ctci-making-anagrams
**/
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
@tylersloeper
tylersloeper / Arrays: Left Rotation in C
Last active April 15, 2020 17:32
Hacker Rank: Arrays: Left Rotation, (in c, c#, php, and javascript)
/**
The challenge:
https://www.hackerrank.com/challenges/ctci-array-left-rotation
**/
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
@tylersloeper
tylersloeper / fifteen.c
Created December 2, 2016 04:17
CS50 Pset03 (2 parts)
/**
* fifteen.c
*
* Computer Science 50
* Problem Set 3
*
* Implements Game of Fifteen (generalized to d x d).
*
* Usage: fifteen d
*
@tylersloeper
tylersloeper / caesar.c
Created December 2, 2016 03:39
CS50 Pset02 (3 parts)
#include <cs50.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
int main(int argc, string argv[])
{
int i = 0;
int stringlength = 0;
@tylersloeper
tylersloeper / greedy.c
Last active December 2, 2016 03:34
CS50 Pset01 (3 parts)
#include <stdio.h>
#include <cs50.h>
int main(void)
{
float money;
float tempmoney;
//float startmoney;
int quarter;
quarter = 0;
@tylersloeper
tylersloeper / FinalProjectTylerLoeper_pa.c
Last active December 2, 2016 03:23
Launch Code, CS50, MDC, Final project - platformer game in c
/**
* Project Title: Platformer Game in C
* Creator: Tyler Loeper, for CS50 Miami, Summer 2016 cohort.
* Completed: 9/3/2016
*
* Overview:
* This is a small game in c I created to mimic the 1990s mario games. In it a small 2d world is rendered, and the player (graphically represented by the letter "t") is tasked
* with reaching the of the world and win by touching a flag "p". The player has several moves availible, including dashes and jumps, and must avoid spikes and falls in order to reach the end.
*
* The game makes use of several function prototypes, and uses pointers to track the position of the player. Pointers were necessary because these variables (worldpositionx, and worldpositiony) needed to be