The Travels of Marco Cai

  • Home

  • About

  • Tags

  • Archives

  • Search

Plotly: beautiful graph-building tool

Posted on 2018-06-15 |

Found this super powerful graphing tool by chance. It satisfies a few key demands:

  1. It builds interative beautiful plots.
  2. It can output as html or embeddable html code.
  3. It also offer a online mode to view plots through a dashboard and to embed plots through its api, if data safety is not a big concern.

Ref:

  • https://plot.ly/python/#fundamentals
  • https://images.plot.ly/plotly-documentation/images/python_cheat_sheet.pdf

Below are some small example usage…

Read more »

Plotly: show page

Posted on 2018-06-15 |

[LeetCode] Challenge log 696

Posted on 2018-06-14 | Edited on 2018-06-20 |
696. Count Binary Substrings
  1. First solution first finds a boundary st.”01” and then extends the string to both sides to check if qualified.
  2. Optimal Solution keeps counting how many contegious ‘0’ and ‘1’ currently and previously to achieve O(n) time and O(1) space.
Read more »

[LeetCode] Challenge log 788

Posted on 2018-06-10 |
788. Rotated Digits

It is a logic problem. My solution is:

  1. If it contains 3 4 7, it is invalid.
  2. If it contains only 0 1 8, it is valid but not different.
  3. The rest cases are passed.
Read more »

[LeetCode] Challenge log 448

Posted on 2018-06-08 |
448. Find All Numbers Disappeared in an Array

The quick and dirty solution is to use set/hashmap again. The other satisfied solution is using the sign of a number(+/-) to mark whether it shows up before, without extra space. Whoever came up with this really knows how to unitilize space…

Read more »

[LeetCode] Challenge log 389

Posted on 2018-06-08 |
389. Find the Difference

Best solution is to use bitwise operation XOR: same ele will be cancel if xor twice.

Read more »

[LeetCode] Challenge log 690

Posted on 2018-06-08 |
690. Emplyee Importance

BFS, one time AC

Read more »

[LeetCode] Challenge log 283

Posted on 2018-06-08 |
283. Move Zeros

The key is to use no extra space, hence swap is most convenient. To optimize operation, only swap when encounter zeroes.

Read more »

[LeetCode] Challenge log 520

Posted on 2018-06-08 |
520. Detect Capital

Easy Level.

Read more »

UCSD course plan

Posted on 2018-06-07 | Edited on 2018-06-14 |

This is a note of the course plan for my master degree at UCSD. It’s planned to be finished in 4 quarters, temporarily.

Read more »
1…456…13
Mingxiang Cai

Mingxiang Cai

A learner, a hobbyist.

128 posts
56 tags
© 2019 Mingxiang Cai
0%