Skip to content

Instantly share code, notes, and snippets.

View cengiz-io's full-sized avatar

Cengiz Can cengiz-io

View GitHub Profile
@cengiz-io
cengiz-io / reverse_words.cpp
Created December 14, 2014 23:08
CodeEval Challange 8 - Reverse Words
#include <iostream>
#include <sstream>
#include <stack>
#include <string>
using namespace std;
int main(int argc, const char * argv[]) {
string line;
#define DEBUG 0
#include <iostream>
#include <sstream>
#include <fstream>
#include <stdlib.h>
#if DEBUG
#include <bitset>
#endif
#include <iostream>
#include <sstream>
#include <fstream>
#include <stdlib.h>
#include <iterator>
#include <vector>
#include <set>
using namespace std;
#include <iostream>
#include <sstream>
#include <fstream>
#include <queue>
using namespace std;
struct OrderByLength {
bool operator() (string const &a, string const &b) {
return a.length() < b.length();
.PHONY: clean app
app:
g++ \
-pedantic \
-Wall \
-Wextra \
-Wcast-align \
-Wcast-qual \
-Wctor-dtor-privacy \
-Wdisabled-optimization \
#include <iostream>
#include <sstream>
#include <fstream>
#include <vector>
#include <numeric>
#ifndef __APPLE__
#include <algorithm>
#endif
#include <iostream>
#include <sstream>
#include <fstream>
#include <vector>
#include <set>
#include <iterator>
#ifndef __APPLE__
#include <algorithm>
#endif
#include <iostream>
#include <sstream>
#include <fstream>
#include <stack>
using namespace std;
int main(int argc, char *argv[]) {
ifstream datafile(argv[1]);
#include <iostream>
#include <string>
#include <vector>
template<typename T>
std::ostream& operator<<(std::ostream& os, const std::vector<T>& vec)
{
for (auto& el : vec)
{
os << el << ' ';
@cengiz-io
cengiz-io / count_forever.c
Created March 5, 2015 23:32
Messing with a Common Anode Seven Segment Display on Arduino Uno
#define _A 7
#define _B 6
#define _C 4
#define _D 2
#define _E 1
#define _F 9
#define _G 10
#define _DP 5
#define LED_OFF 1
#define LED_ON 0