dpalmasan / competitive-programming Goto Github PK
View Code? Open in Web Editor NEWLearning competitive programming
License: MIT License
Learning competitive programming
License: MIT License
Given an array of events with their starting and ending times (start, end)
, return the best schedule (maximum amount of events) selecting events that could be scheduled without overlapping times.
Seems like doctest will do the trick as it is easy to set up and lightweight.
Set up gcov to check coverage.
Find a path from the upper left corner to the lower right corner of an n x n
grid, with the restriction that we can only move down and right. Each path contains and integer and the path should be constructed so that the sum of the values along the path is as large as possible.
Chapter 4 examples:
Add a solution for a variation of the coin change problem, in which we are interested in counting the number of ways you can arrange coins to sum a certain amount n
.
Example:
coins = {1, 3 , 4}
, n = 5
, there are 6 ways to arrange the coins to sum 5
:
1 + 1 + 1 + 1 + 1
1 + 1 + 3
1 + 3 + 1
3 + 1 + 1
1 + 4
4 + 1
Implement a function that receives an array as input and returns true
if the array has unique elements and false
otherwise. Implement an O(n log n)
approach (use sorting)
Given a list of weights [w1, w2, ..., wn]
, determine all sums that can be constructed using the weights. For example, if we have the weights w = [1, 3, 3, 5]
, in this case all sums between 0 and 12 are possible, except 2 and 10.
In a restaurant, customers arrive and leave during all the service hours. We'd like to find the maximum amount of customers at a given time window. Suppose we know the arriving and leave time (input), find the maximum amount of customers in the restaurant.
Solution for longest increasing subsequence problem.
Implement algorithms for different time complexities and document explanations.
Suppose we have a set of coin values coins = {c1, c2, ..., ck}
and a target sum n
. We are asked to construct the sum n
using as few coins as possible.
Examples:
coins = {1, 2, 5}
and n = 12
an optimal solution would be 5 + 5 + 2
, which is 3 coins.coins = {1, 3, 4}
and n = 6
, an optimal solution would be 3 + 3 = 6
Generating permutations example and explanation.
Examples will be added to "Learn by doing", and also they will be explained.
Examples will be written in C++ and Python. We need to define a Makefile to build each of the exercises, and also for testing purposes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.