Skip to content

abhishek97s/LeetCode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode

LeetCode Solutions

Getting Started

In this repository, I'll work on solutions to LeetCode problems by C++, Java, and Python as much as I could.

Also, I build a website by GitHub Actions to host the code files by markdown files. You can see the built page here: LeetCode Solutions.

Coding Style

I believe messy code is costing you.

Therefore, I follow the formatter 99% of the time, but in rare situations, I format the code manually because it might look better in these cases.

Take a look at my nvim configuration related to auto formatting.

In ~/.config/nvim/init.lua:

function sourceLuaFiles(dirname)
  local p = io.popen('ls ' .. dirname .. '| grep .lua')
  for filename in p:lines() do
    require(filename:sub(1, -5))
  end
end

sourceLuaFiles('~/.config/nvim/lua')

In ~/.config/nvim/lua/plugins.lua:

-- Autocommand that formats on save
vim.cmd [[
  augroup autoformat_settings
    autocmd!
    autocmd FileType c,cpp,java AutoFormatBuffer clang-format
    autocmd FileType python AutoFormatBuffer autopep8
  augroup END
]]

-- Use packer plugin
local status_ok, packer = pcall(require, 'packer')
if not status_ok then return end

-- Install your plugins here
return packer.startup(function(use)
  -- google/vim-codefmt
  use 'google/vim-maktaba'
  use 'google/vim-codefmt'
  use 'google/vim-glaive'
end)

More Information

The repository is still under construction, and the goal is to keep up with the growth of LeetCode problems by the end of the year!

For more information, please visit my GitHub.

Hosted the site on Feb 23, 2019.

Revised on Dec 25, 2019.

Added init.vim on Jan 18, 2021.

Updated to init.lua on Jan 1, 2022.

About

💡 LeetCode in C++/Java/Python (respect coding conventions)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 40.3%
  • C++ 40.3%
  • Python 19.4%