Pascal Triangle

def generate(self, numRows): “”” :type numRows: int :rtype: List[List[int]] “”” answer = [] if numRows == 0: return [] row = [1] answer.append(row) for x in range(2, numRows+1): # Prepare the row row = [1]*x # The first and last element on each row is 1, so skip those # indexes. for y in range(1, … More Pascal Triangle

Top 5 VSCode Extensions for Vim Lovers

Vim Extensions vscodevim: Vim emulation for Visual Studio Code Better Align (: + = in visual mode) Language Specific Extensions C/C++ C/C++ IntelliSense, debugging, and code browsing. Better C++: better-cpp-syntax Golang Go Microsoft Go Group Imports Go Critic Python Python Microsoft Python Extension Pack Ruby Ruby for Visual Studio Code Rubocop Ruby Solargraph Themes Github … More Top 5 VSCode Extensions for Vim Lovers