Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// This is a new kind of solution to that problem. | |
struct Range { | |
int buy; | |
int sell; | |
int maxPrice; | |
Range() : buy (0), sell (0), maxPrice(0) {} | |
}; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
struct Result { | |
int minTrips; | |
std::map<std::vector<bool>, std::vector <int>>* sequence; | |
std::vector <int> optimalVec; | |
Result() : minTrips(0), | |
sequence(new std::map<std::vector<bool>, std::vector <int>>) {} | |
~Result () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
void set_matrix (std::vector<std::vector<int>>& mat, int lenght ) { | |
mat.resize(lenght); | |
for (int i = 0; i < lenght; i++) { | |
mat[i].resize(lenght); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Solution by K Sreram. | |
* Original question: https://www.hackerrank.com/challenges/array-pairs/submissions/code/71255248 | |
* tested with C++14 (g++) | |
*/ | |
#include <cmath> | |
#include <cstdio> | |
#include <vector> | |
#include <iostream> | |
#include <algorithm> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package neuralNetwork; | |
/* | |
* Copyright (c) 2016 K Sreram, All rights reserved. | |
*/ | |
import java.util.ArrayList; | |
import neuralNetwork.neuralInterface.TrainingDataSet; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* copyright (c) 2016 K Sreram, All rights reserved | |
*/ | |
package mainFnc; | |
import neuralNetwork.activationFunctions.*; | |
import neuralNetwork.graphicalAnalysis.ErrorGraph; | |
import neuralNetwork.ioHandler.WeightIOHandler; | |
import neuralNetwork.neuralInterface.NeuralNetworkInterface; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
program author: K Sreram | |
Author E-mail: sreramk@outlook.com | |
License: GNU public license | |
*/ | |
#include <limits> | |
#include <stdlib.h> | |
#include "bellman.h" | |
#include <iostream> | |
BellmanAlgorithm::BellmanAlgorithm() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
program author: K Sreram | |
Author E-mail: sreramk@outlook.com | |
License: GNU public license | |
*/ | |
#ifndef BELLMAN_H | |
#define BELLMAN_H | |
#include <queue> | |
#include <list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
program author: K Sreram | |
Author E-mail: sreramk@outlook.com | |
License: GNU public license | |
*/ | |
#include "bellman.h" | |
#include <iostream> | |
#include <stdlib.h> | |
int main() | |
{ |
NewerOlder