摘要:
HGETALL 介绍 Returns all fields and values of the hash stored at key. In the returned value, every field name is followed by its value, so the length of 阅读全文
摘要:
int trap(vector<int>& height) { int res = 0; int len = (int)height.size(); if (len <= 1) { return res; } int l = 0; int r = len - 1; int l_height = 0; 阅读全文
摘要:
lua里面没有类似C++的三元运算符 a?b:c。 第一种实现 if-else -- 三元运算符 function iif(condition, a, b) if condition then return a else return b end end 第二种实现 一般化的 a and b or 阅读全文