dawnave Goto Github PK
Type: User
Bio: Welcome! For repositories with English names, they are about coding/CS/projects stuff. Else: They are setting collection for my novels
Location: Rochester
Type: User
Bio: Welcome! For repositories with English names, they are about coding/CS/projects stuff. Else: They are setting collection for my novels
Location: Rochester
众所周知,Github功能强大,能让所有人在一个实时更新的平台上查看几乎任何东西,以及它们过去的版本和近期的修改。为了方便整理和更新,这里是乱七八糟的设定集
My solution includes some trick. I used true and false to represent zeros and ones, and a string of bools to represent a bitstring. A quite interesting problem, check my solution for details
Reduction to equal
Another easy question, I was wrong yesterday, it is not the postorder today. Although it is listed as easy, but it took me some time to implement the 2d array correctly, go see the second line of the code for the right way to do that. I believe this is not the first time I make this mistake, so It is quite important.
It is a parser for Lisp language, I wrote it based on several syntactic categories. Basically, it will check about solid number/lower case letters, and the use of parentheses.
A simple program turning an Excel to objects in python and print out results. This can only work for the specific car program, where the columns of the excel file fits the __init__ part.
Finite Automatons, including NFAs and DFAs. You can build your own FAs based on your rule of an accepting String, for example, ending in "cat". In short, NFAs and DFAs recognize strings that are in a specific pattern.
A medium problem, but with surprise, I solved it right away. What a great day.
A easy problem, I messed up with my i's and j's and ended up wrong several times at first.
Finally, here is an improved way to turn a list into a dictionary. The problem itself is not hard, but if you want to same some code and time, check out the new way^_^
Leetcode 1220, a hard DP problem. To me, it is not hard, the patterns behind is quite easy to find if you draw a table. Also, the given hint helped a lot. A bug I encountered is how to initialize the 2D dp table. When using [0,0,0] * n, the sublists are not independent and change in one of them will affect the whole table, so using a for loop is r
A easy problem with about 80% acceptance rate, easy logics easy coding, at least to me
A medium question, it took me a while to figure out that I splited two appearance of "c" in the word "practice" in two categories. Overall, it requires some logics, I will consider it as among the medium in the medium problems
A easy problem, but it requires some basic knowledge. Easy logics, but hard code for people like me who are not familiar to bits and things like that.
I wasn't thinking about brute force as a solution at first, because that usually stands for a time limit exceeded. However, I found that there probably aren't any tricky and better methods. So here is the brute force solution, simply going through all the possible substrings.
Another easy problem. One bug that I encountered is the sequence in the loop. If I do everything inside one loop, I will ignore the cities that appear in the i[0] first, leading to bugs. Interestingly, there seems no way better solutions to this problem, everyone gets pretty much the same complexity.
A daily question, using a stream of integers to build an array. Quite easy to be honest, all we need to do is to find the pattern, which is hinted in the hint section. Then, we can use the for loop of a pointer to set up the control flow and achieve the goal.
A simulation, solved by brute force. I was thinking about using better solutions, but it came out that just simulate the move of the particle is a good idea. Other solutions online are more or less the same.
A leetcode problem. The hint is being kind of misleading. You can pass the first two test cases by simply simulate the game, but it will exceed the time limit in the end. Therefore, some logics are needed. Again, easy coding hard logic
A problem that requires finding a hard pattern.
A easy problem, nothing to really talk about
There is no need for a complex thing, just return n-1
I got it wrong several times because I didn't read the questions carefully, but overall it is easy.
A heavy math problem, lots of adding and multiplication to consider. My solution utilized the index of an array, which is not necessary but worth using.
I didn't finish this one, I can't think of a way that takes less then n^2. The solution uses a dictionary, a DFS, and a recursion, and that is a lot for a medium problem. It first uses a dictionary to get the head of the array, and use DFS to get its tail, recursively.
A interesting problem. I followed the hint, using nC2 where n is the length of the continuous substring. There is also a much more elegant sliding window solution. What's funny is, I got the pattern but I forgot how to slide the window, so I missed the better solution. But anyway, using math is still enough to figure out the problem.
A not-really Hard problem, using two pointers to do a seemingly brute force
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.