diff --git a/Program's_Contributed_By_Contributors/C++/vertical-traversal-binary-tree.cpp b/Program's_Contributed_By_Contributors/C++/vertical-traversal-binary-tree.cpp new file mode 100644 index 0000000000..88c2c88e99 --- /dev/null +++ b/Program's_Contributed_By_Contributors/C++/vertical-traversal-binary-tree.cpp @@ -0,0 +1,33 @@ +void vTraversal(Node *root) +{ + map> mp; + queue>q; + q,push({root,0}); + while(q.empty()==false) + { + auto p = q.front(); + Node *curr = p.first; + int hd = p.second; + mp[hd].push_back(curr->data); + q.pop(); + if(curr->left != NULL) + { + q.push({curr->left, hd-1}); + } + if(curr->right != NULL) + { + q.push({curr->right, hd+1}); + } + } + + +for(auto p: mp) +{ + vector v =p.second; + for(int x: v) + { + cout< - -## Avoid Conflicts {Syncing your fork} - -An easy way to avoid conflicts is to add an 'upstream' for your git repo, as other PR's may be merged while you're working on your branch/fork. - -```terminal -git remote add upstream https://github.com/fineanmol/Hacktoberfest2022 -``` - -You can verify that the new remote has been added by typing -```terminal -git remote -v -``` - -To pull any new changes from your parent repo simply run -```terminal -git merge upstream/master -``` - -This will give you any eventual conflicts and allow you to easily solve them in your repo. It's a good idea to use it frequently in between your own commits to make sure that your repo is up to date with its parent. - -For more information on syncing forks [read this article from Github](https://help.github.com/articles/syncing-a-fork/). - -## Swags of Hacktoberfest: -- Many of the candidates get attracted towards hacktoberfest to get swags . So, after 4 successfully merged pull request as for 2021 you will be eligible to get a Hacktoberfest T-shirt and Some stickers on your doorstep. - -
  • tshirt image

    stickers image

    -
  • - -# FAQs (Frequently Asked Questions) - -- Who all can contribute? - - Anyone with a github account and who is signed up for -[hacktoberfest](https://hacktoberfest.digitalocean.com/) :) -- Are you getting paid for this? - - Sadly no. But we think we should. This is 100% unofficial and we do it for fun, fame and glory. -- Who are you and why are you doing this? - - We are two programmers from India [Anmol](https://www.linkedin.com/in/fineanmol/) - and [Ritesh](https://github.com/ritesh2905). We are doing this because we love Open Source and Hacktoberfest. We want to make it easier for people to get started with Hacktoberfest and Open Source. -- Why are you not using digitalocean? - - Because we only know JavaScript and suck at servers. We use [now](https://zeit.co/now) instead. - -- Should I come closer to the text saying 'Don't come closer' on the left side of the home tab ? - - Nope. -- How many pull request (PR) must be made, if I want to get an awesome tshirt from Hacktoberfest 2022? - - 4 -- How do I track my progress to get an awesome shirt from Hacktoberfest 2022? - - [go to :](https://hacktoberfest.digitalocean.com/profile/). (Check Out Your Own Stats at Right Top) -- What is the duration of Hacktoberfest 2022? - - It is from 1st october to 31st october 2022... -- What is the event for? - - For the open source community engagement - - - - -###### *We will do our best to merge as much as possible from everyone. However, time is limited and the merge conflicts are horrible :astonished: <3* diff --git a/readme.md b/readme.md deleted file mode 100644 index 112b0506e7..0000000000 --- a/readme.md +++ /dev/null @@ -1 +0,0 @@ -My contribution for Hacktoberfest 2022.