GithubHelp home page GithubHelp logo

vnaonlu / leetcode-daily Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 2.0 9.89 MB

a project including my leetcode solutions with unittests, which are written in c++.

License: MIT License

CMake 0.07% C++ 95.71% Python 4.22% Shell 0.01% Batchfile 0.01%
cpp cpp20 leetcode leetcode-solutions algorithms

leetcode-daily's Issues

LDT: merge message.

A merged message from devel/daily to main is need.
I am considering the following format:


adds the {count} solution(s) in week{week}.
add solutions details:
  * {rev} adds q{id} with TC O({tc}) and SC O({sc}).
  * {rev} adds q{id}.
  * {rev} adds q{id} with TC O({tc}) and SC O({sc}) where {note}.

The string in test cases is not define if the value is "".

Found the issue in Question #17

TEST(q17, sample_input02) {
  l17::Solution solver;
  // miss this-> string digits = "";
  vector<string> exp = {};
  // Try EXPECT_EQ_ANY_ORDER_RECURSIVE
  // if the element is also matched in any order.
  EXPECT_EQ_ANY_ORDER(solver.letterCombinations(digits), exp);
}

Wrong test case parsing with question 463

TEST(q463, sample_input01) {
  l463::Solution solver;
  vector<vector<int>> grid = {};
  //0 = 0
  //1 = 1
  //1 = 0
  //0 = 1
  //0 = 0
  //1 = 1
  //0 = 0
  int exp = 16;
  EXPECT_EQ(solver.islandPerimeter(grid), exp);
}

Wrong unit test template generated when the type of solution function is void.

Found issue when adding question #130

template generated by leetcode_add.py:

// since the solution function with void return type
void solve(vector<vector<char>>& board) {}

// then the pytool generates an ambiguous variable.
void exp = [["X","X","X","X"],["X","X","X","X"],["X","X","X","X"],["X","O","X","X"]];

Wrong argument type generated

Found the issue with Question #174

//actual
  vector<int> dungeon = {-2, -3, 3, -5, -10, 1, 10, 30, -5};

//expect
  vector<vector<int>> dungeon = {{-2, -3, 3}, {-5, -10, 1}, {10, 30, -5}};

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.