leetcode

Solution to some Leetcode problems written in C++
git clone git://git.dimitrijedobrota.com/leetcode.git
Log | Files | Refs | README | LICENSE |

commit53ee7d7b424ded19cc377c1f8e7b6c9de5f980d8
parent66a48a2b8d4d2f097dd4bc313aeea5ba7c1d7c45
authorDimitrije Dobrota <mail@dimitrijedobrota.com>
dateSun, 1 Jan 2023 21:45:33 +0100

Add script to automatically formatting new files

Diffstat:
Aformat.sh|+++++++++

1 files changed, 9 insertions(+), 0 deletions(-)


diff --git a/format.sh b/format.sh

@@ -0,0 +1,9 @@

#!/bin/bash
# Format newly added files using clang-format
# Note: must run before git add
for i in $(git diff README.md | grep '+' | cut -d'|' -f2 -s)
do
echo "Formating: $i"
clang-format -i ./Problems/$i.cpp
done