-
I am Ryoma Okuda and my student id is: s1270174
-
email contact from: [email protected]
docker-compose up -d && docker-compose exec cpp_exercises bash
I am Ryoma Okuda and my student id is: s1270174
email contact from: [email protected]
docker-compose up -d && docker-compose exec cpp_exercises bash
@jumang4423 for ex01-q2, the (second) formula defining the pmf is recursive. Thus the function binomialPMF
can be defined as a recursive function. Can you please try? (the implementation is 3 lines, including the base cases)
@jumang4423 ex01-q1 looks good.
Only a few minor things:
putMinus(str, getDigit(num)+1);
? I.e. you want the terminal '\0' to be moved as well (I think that with the current implementation it gets overwritten). Could you please check?The code is very well written (and documented).
@jumang4423 A few minor things for ex03 - q1 (it looks almost perfect):
float
instead of double
.
After
cpp_exercises/ex3/Question 1/test_pointers.cpp
Lines 65 to 68 in d371284
delete[] dd;
to match the new
here:
In ex07 - q2 (exception), the only changes should be:
example
where you replace FILE*
with LogFile
main
where you add a try
/ catch
blockThere is no need to rewrite, for example, doSomeComputation
.
Similarly, the LogFile
object should be a local object in the function example
. We are experimenting with releasing resources while manipulating exceptions.
@jumang4423 Minor issues for ex02-q2
cpp_exercises/ex2/Question 2/streams.cpp
Lines 9 to 13 in d371284
The rest looks good.
@jumang4423
Your implementation does not use the specified comparison function
@jumang4423 I would like to suggest to modify your .gitignore file such that you do not track auxiliary files. For example, .DS_Store, .vscode, ...
@jumang4423 The const-correctness for ex04 looks good.
It is possible to improve the inc_
functions by considering the number of days per month, and the number of months per year.
@jumang4423 For ex02-q1, these are some minor issues:
Stack::size
return _top+1
?The rest looks very good.
@jumang4423
Q1:
is_numeric
instead of is_numberic
?Q2:
It is OK to include bits/stdc++.h in competitive programming, but otherwise, it is better to include only what is really necessary.
@jumang4423 please use guards in the header files (in this case "inc.h") to prevent multiple inclusions.
In ex06 - q2, the class Polygon
should implement the interface Shape2D
. (it should inherit from Shape2D
and implements its pure virtual functions).
@jumang4423 In ex05:
delete[]
before writing _items = new double[]
)@jumang4423 I would recommend to avoid using pre-compiled headers for now (unless you are really sure about what it does).
MatNxN
is a generalization of Mat4x4
N
, 4 is used in several instancesoperator+=
, operator-=
, operator*=
) should return by reference (otherwise they can't be chained)operator()(int, int)
seems to be missing@jumang4423 Please add try
/ catch
blocks in the main
function. (We have a guarantee that in the event of an uncaught exception, std::terminate
is being called - thus the error messages that you got).
Shape2D
(ex06) is an interface. Its member functions should be pure virtual. This is not the case in your implementation.create
and clone
are missing in Shape2D
@jumang4423
Q1 looks good.
For q2, use nth_element
to compute the median (instead of sorting).
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.