Skip to content

Instantly share code, notes, and snippets.

View matteatsleftovers's full-sized avatar

Matt Olson matteatsleftovers

  • Detroit Labs
  • Ann Arbor, MI
View GitHub Profile
@matteatsleftovers
matteatsleftovers / npm-link-and-unlink.md
Created April 25, 2023 15:06
Linking and Unlinking Packages and Modules with npm
@matteatsleftovers
matteatsleftovers / ch10-doubly-linked-list.c
Created May 14, 2018 16:23
ch10-doubly-linked-list.c
// Program to explore a doubly linked list
#include <stdio.h>
struct entry
{
int value;
struct entry *previous;
struct entry *next;
};
/* A function to determine the position of a character substring in a string,
returning the position of the substring if contained, and -1 if not */
#include <stdio.h>
// Function to find the length of a given string
int getStringSize (const char *s1)
{
int size = 0;
while ( s1[size] != '\0' ) size++;
@matteatsleftovers
matteatsleftovers / ch9-ex5-find-string.c
Created May 7, 2018 16:38
Week 3, Chapter 9, Exercise 5
/* A function to determine the position of a character substring in a string,
returning the position of the substring if contained, and -1 if not */
#include <stdio.h>
// Function to compare two character strings
int findString (const char s1[], const char s2[])
{
int i = 0, j = 0, startIndex = 0, answer = -1;