Instantly share code, notes, and snippets.

View Hacker Rank: Pairs
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[]) {
@autoreleasepool {
// insert code here...
int numberOfIntegers = 0;
scanf("%d", &numberOfIntegers);
View Hacker Rack: Swap Nodes [Algo]
//
// main.cpp
// Swap Nodes [Algo]
//
// Created by Nathan Arnold on 11/10/15.
// Copyright © 2015 Nathan Arnold. All rights reserved.
//
#include <cmath>
#include <cstdio>
View Hacker Rank: Sherlock and Array
//
// main.m
// Sherlock and Array
//
// Created by Nathan Arnold on 11/9/15.
// Copyright © 2015 Nathan Arnold. All rights reserved.
//
#import <Foundation/Foundation.h>
View Hacker Rank: Sherlock and the Beast
//
// main.m
// Sherlock and the Beast
//
// Created by Nathan Arnold on 11/9/15.
// Copyright © 2015 Nathan Arnold. All rights reserved.
//
#import <Foundation/Foundation.h>
View Hacker Rank: Angry Professor
//
// main.m
// Angry Professor
//
// Created by Nathan Arnold on 11/9/15.
// Copyright © 2015 Nathan Arnold. All rights reserved.
//
#import <Foundation/Foundation.h>
View Hacker Rank: Breadth First Search: Shortest Reach
//Enter your code here. Read input from STDIN. Print output to STDOUT//
// main.m
// Breadth First Search: Shortest Reach
//
// Created by Nathan Arnold on 11/1/15.
// Copyright © 2015 Nathan Arnold. All rights reserved.
//
#import <Foundation/Foundation.h>
View Hacker Rank: Alternating Characters
#import <Foundation/Foundation.h>
int deletionsRequiredForString (char buffer[], int length) {
int deletions = 0;
if (length > 1) {
View Hacker Rank: Gemstones
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[]) {
@autoreleasepool {
// insert code here...
int numOfStones = 0;
scanf("%d", &numOfStones);
NSMutableArray *stoneList = [NSMutableArray arrayWithCapacity:numOfStones];
View Hacker Rank: Stock Maximize
//
// main.m
// Stock Maximize
//
// Created by Nathan Arnold on 11/1/15.
// Copyright © 2015 Nathan Arnold. All rights reserved.
//
#import <Foundation/Foundation.h>
View Hacker Rank: Flipping Bits
//
// main.m
// Flipping Bits
//
// Created by Nathan Arnold on 11/1/15.
// Copyright © 2015 Nathan Arnold. All rights reserved.
//
#import <Foundation/Foundation.h>