Skip to content

Instantly share code, notes, and snippets.

View nachiketkanore's full-sized avatar
🖥️
Exploring Computer Science

Nachiket Kanore nachiketkanore

🖥️
Exploring Computer Science
View GitHub Profile
@nachiketkanore
nachiketkanore / Stack_ArrayImplementation_OOP.cpp
Created January 24, 2019 08:48 — forked from mycodeschool/Stack_ArrayImplementation_OOP.cpp
An object oriented implementation of stack using arrays in C++.
// Stack - Object oriented implementation using arrays
#include <iostream>
using namespace std;
#define MAX_SIZE 101
class Stack
{
private:
int A[MAX_SIZE]; // array to store the stack
int top; // variable to mark the top index of stack.
@nachiketkanore
nachiketkanore / a.cpp
Created April 23, 2020 19:08 — forked from IvanIsCoding/a.cpp
Educational Dynamic Programming Contest - AtCoder
// Ivan Carvalho
// Problem A - Educational Dynamic Programming Contest - AtCoder
// Link : https://atcoder.jp/contests/dp
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
const int INF = 2*1e9;
int dp[MAXN],N,K,h[MAXN];