From bb5460bb047158f070a6a2713fb77eb47ee4fb28 Mon Sep 17 00:00:00 2001 From: vishwas6664 <67286539+vishwas6664@users.noreply.github.com> Date: Tue, 11 Oct 2022 00:02:34 +0530 Subject: [PATCH] Add files via upload --- .../C++/1. Problems/zigzag_Conversion.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 LeetCode Questions/C++/1. Problems/zigzag_Conversion.cpp diff --git a/LeetCode Questions/C++/1. Problems/zigzag_Conversion.cpp b/LeetCode Questions/C++/1. Problems/zigzag_Conversion.cpp new file mode 100644 index 00000000..89ac17d3 --- /dev/null +++ b/LeetCode Questions/C++/1. Problems/zigzag_Conversion.cpp @@ -0,0 +1,18 @@ +class Solution { +public: + string convert(string s, int numRows) { + string ans; + vector tmp(numRows); + //create strings for each row + int i=0, n=s.size(); + while(i0 && i