Skip to content

Instantly share code, notes, and snippets.

def parseDest(dest):
destTable = {
None: "000",
"M": "001",
"D": "010",
"A": "100",
"MD": "011",
"AM": "101",
"AD": "110",
"AMD": "111"
//
// Created by liron on 9/11/17.
//
#ifndef EX3_MATRIX_HPP
#define EX3_MATRIX_HPP
#include <vector>
//
// Created by liron on 9/7/17.
//
#include <memory>
#include "ShapeFactory.h"
/**
* Creates a shape of the given type and points.
CC=g++
LDLIBS=-lm
CFLAGS= -Wextra -Wall -Wvla -pthread -std=c++17
TARFLAGS= -cvf
TARARGS=README Makefile Point.h Point.cpp PointSet.h PointSet.cpp ConvexHull.cpp PointSetBinaryOperations.cpp
all: ConvexHull PointSetBinaryOperations
./PointSetBinaryOperations
tar: $(TARARGS)
CC=g++
LDLIBS=-lm
CFLAGS= -Wextra -g -Wall -Wvla -std=c++17
TARFLAGS= -cvf
#TARARGS=README Makefile Point.h Point.cpp PointSet.h PointSet.cpp ConvexHull.cpp PointSetBinaryOperations.cpp
all: ConvexHull PointSetBinaryOperations
./PointSetBinaryOperations
tar: README Makefile Point.h Point.cpp PointSet.h PointSet.cpp ConvexHull.cpp PointSetBinaryOperations.cpp
@lironsade
lironsade / ConvexHull.cpp
Last active September 1, 2017 19:18
ConvexHull.cpp
#include <iostream>
#include <math.h>
#include <algorithm>
#include "Point.h"
#include "PointSet.h"
static Point minPoint;
PointSet& getInput()
{
PointSet *ps = new PointSet{};
/*
* implement with DFS
*/
pNode getBest(pNode head, getNodeChildrenFunc getChildren, \
getNodeValFunc getVal, freeNodeFunc freeNode, copyNodeFunc copy, unsigned int best)
{
/* head */
pNode* childs;
unsigned num_of_childs = getChildren(head, childs);
/* node */
1
-1
1
1
1
1
1
1
1
1
-1
1
-1
1
-1
-1
1
1
1
1
static boolean test9() {
int[] a = {4,5,6,7,8,9};
int i = 0;
AvlTree b = new AvlTree(a);
boolean flag = true;
for (int x : b) {
if (x != a[i])
flag = false;
i++;
}