diff --git a/.gitignore b/.gitignore index e5afb67..da34189 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ _site/ .jekyll-cache/ .jekyll-metadata README.md.bak +.idea/ diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index bcf3b9d..7256f11 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -1,8 +1,10 @@ :warning: This is a Pull Request Template :warning: + > Checkout all the things you've done by placing an \*x*\ within the square braces. + ## Proposed Changes - [ ] I've forked the repository. -- [ ] I've created a branch and made my chagnes in it. +- [ ] I've created a branch and made my changes in it. - [ ] I've read the [CODE OF CONDUCT](https://github.com/my-first-pr/hacktoberfest-2018/blob/master/CODE_OF_CONDUCT.md) and abide to it. - [ ] I've read the [CONTRIBUTING.md](https://github.com/my-first-pr/hacktoberfest-2018/blob/master/CONTRIBUTING.md) - [ ] I understand opening a PULL REQUEST doesn't mean it will be merged for sure. diff --git a/README.md b/README.md index 5608d9d..3a9a0cd 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![Open Source Love](https://img.shields.io/badge/Open%20Source-%E2%9D%A4-pink.svg) +![Open Source Love](https://img.shields.io/badge/Open%20Source-%E2%9D%A4-pink.svg) ![First Timers Only](https://img.shields.io/badge/first--timers--only-friendly-blue.svg?style=flat) ![Up For Grabs](https://img.shields.io/badge/up--for--grabs-friendly-green.svg?style=flat) @@ -79,6 +79,10 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - [![facebook-alt][facebook-img]](https://facebook.com/abaykandotcom) [![twitter-alt][twitter-img]](https://twitter.com/abaykandotcom) [![github-alt][github-img]](https://github.com/abaykan) + +### Abhishek Kumar +- Competietive Coder +- Student, Self taught ### Adeonir Kohl @@ -164,6 +168,12 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU [![github-alt][github-img]](https://github.com/mudspringhiker) - [Know more at](https://alonavarshal.com) +### Amintas Victor + +- I'm a Science Computing graduating, from Brasil +- About Me: Web developer, Literati, Cinephile, Enthusiast in Psychology and Philosophy, and Cook in my spare time +- [![github-alt][github-img]](https://github.com/amintasvrp) + ### Ana Carolina Ferreira - I am a software developer undergraduate student, from Brasil @@ -250,13 +260,19 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - [![github-alt][github-img]](https://github.com/Arisdolanan) - [![facebook-alt][facebook-img]](https://facebook.com/arisdolanan) -### Arjun Rajpal +### Arighna Chakrabarty +- I'm cuerrently a student at IIT Guwahati, India. +- My passions are:- + - Python Developer + - DL enthusuiast + - Open Source Freak (Have worked in SymPy..!) +- [![github-alt][github-img]](https://github.com/ArighnaIITG) -- Software Engineer and a ML Enthusiast -- [![github-alt][github-img]](https://github.com/arjunrajpal) +### Arjun Rajpal + - Software Engineer and a ML Enthusiast + - [![github-alt][github-img]](https://github.com/arjunrajpal) ### ASHKUSH - - Undergrad 2nd year CS student - Open Source contributor - [![github-alt][github-img]](https://github.com/ashkush21) @@ -360,6 +376,13 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU # C +### Caitlyn Woods + +- Self-study student, learning on a budget +- Grow with Google Udacity scholar for Android Basics Nanodegree +- New to open source, looking to get experienced +- [![github-alt][github-img]](https://github.com/catielynncodes) + ### Celso Uliana - Last year student. @@ -382,6 +405,13 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - Lover of programming, drums, cars, ping-pong and anime. - [![github-alt][github-img]](https://github.com/costassolla) +### Chirag Gupta +- First Year Student +- Interested in development, machine learning. +- Lover of programming, Greek mythology, Marvel. +- [![github-alt][github-img]](https://github.com/chirag2506) + [![twitter-alt][twitter-img]](https://twitter.com/chiraggupta2506) + ### CohheeTime - I built my first website in 1999 @@ -467,6 +497,12 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - Software Developer and a ML enthusiast. - [![github-alt][github-img]](https://github.com/dushyantRathore) +### Dustin M + +- Engineering enthusiast. Love to tinker with things +- Bio graduate from University of Hawaii +- [![github-alt][github-img]](https://github.com/SnowyMan) + ### David Marques - I'm a student from Brazil @@ -494,6 +530,12 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - Developer wannabe. - [![github-alt][github-img]](https://github.com/Busterz) +### Dhimas Bayu + +- I'm a student +- Interested in angular, java +- [![github-alt][github-img]](https://github.com/bailram) + # E ### Elijah Rwothoromo @@ -537,7 +579,18 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - My hobbies include... - [![github-alt][github-img]](https://github.com/fabipriscila) +### Fahmi Muhammad + +- Android Developer +- Interested in Android and Games +- [![github-alt][github-img]](https://github.com/fahmimuh) + # G +### Gabriel + +- I'm a computer science student +- I'm a java, python, C++ developer. + [![github-alt][github-img]](https://github.com/gabriel-arauj) ### Gargi @@ -579,8 +632,13 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - Gaming - [![twitter-alt][twitter-img]](https://twitter.com/ganeshmajhi) [![github-alt][github-img]](https://github.com/ganeshmajhi) - - ### Gunnika Batra + +### Gayathri Venkatesh +- I'm a first year computer science student from IIIT Bangalore :) +- Hobbies: coding, singing, dancing, sketching. +- [![github-alt][github-img]](https://github.com/GayathriVenkatesh)[![facebook-alt][facebook-img]](https://www.facebook.com/gayathri.venkatesh.73) + +### Gunnika Batra - I'm a 2nd year B.Tech student. - Hobbies: Coding and Sketching @@ -637,12 +695,31 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - [![github-alt][github-img]](https://github.com/ryokugyu) [![twitter-alt][twitter-img]](https://twitter.com/ryokugyu_) +### Himanshu Aggarwal +- Studies at IIITD. +- I am a Data Science enthusiast. +- [![github-alt][github-img]](https://github.com/himanshu0113) + ### Ha Huy Long Hai - An undergraduate Computer Science student - Interests: Machine learning - [![github-alt][github-img]](https://github.com/longhai18) +### Hrushikesh Bodas +- An Undergraduate Engineering Student +- Interest Anything that involves Code +- I love Python And C++ +- First Hacktoberfest +- [![github-alt][github-img]](https://github.com/hrushikeshbodas) + +### HubbleJo + +- Student from Germany +- Really likes Kotlin +- Also interested in electronics and artificial Intelligence +- [![github-alt][github-img]](https://github.com/hubblejo) + # I ### Icaro Lima @@ -693,6 +770,11 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU # J +### J Hi-Tech +- Software dev rusty with github's online tool +- Learning angular 6, looking for projects to help out +- [![github-alt][github-img]](https://github.com/jhinton2015) + ### James - DevOps Engineer @@ -711,6 +793,11 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - I also like playing the cello, watching shows on Netflix, and cooking. - [![github-alt][github-img]](https://github.com/janicek1m) +### Janitha Rasanga +- I am a student of University of Moratuwa +- [![facebook-alt][facebook-img]](https://web.facebook.com/janitha.rasanga.7) + [![github-alt][github-img]](https://github.com/Janitha133) + ### Jason - AI/ML enthusiast @@ -769,6 +856,11 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - I like developing and doing graphic art! - [![twitter-alt][twitter-img]](https://twitter.com/jvcks0n) +### J.D. + +- I'm a software developer from Germany +- I like Lord of the Rings + ### João Pedro B.B. - A Brazilian trying to print Hello World. @@ -807,8 +899,15 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - [![facebook-alt][facebook-img]](https://www.facebook.com/joao.coelho.505) - [![github-alt][github-img]](https://github.com/vtavares11) + +### Jerin +- I'm a CSE engineering student +- [![github-alt][github-img]](https://github.com/jerinjoseph1) + + # K + ### Kautuk Kundan - Btech 3rd Year student at IPU @@ -827,6 +926,17 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - Loves coding and dancing. - [![github-alt][github-img]](https://github.com/KanchanThareja) +### Kanishk Gupta +- Student,At Chandigarh University , tech enthusiast. +- Currently, I am Campus Ambassador at HackerEarth. +- I am love to take challenges!! +- [![github-alt][github-img]](https://github.com/gkanishk) + +### Karan Tandon +- Student +- Love Mathematics and Tech +- [![github-alt][github-img]](https://github.com/karan2dec) + ### Karen Geerts - I work for REA (https://www.rea-group.com/IRM/content/default.aspx) and am a junior Ruby developer. @@ -839,6 +949,12 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - I like to code and build applications. - [![github-alt][github-img]](https://github.com/Karthik-0) +### Kasi Venkata Sai Potluri + +- CSE student,GAYATRI VIDYA PARISHAD COLLEGE OF ENGINEERNG +- I want to contribute for opensource +- [![github-alt][github-img]](https://github.com/kasivenkatasai) + ### Kathleen Cram - I am a senior studying Web Development and Computer Science. @@ -859,6 +975,12 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - I love playing games and waching movies. - [![github-alt][github-img]](https://github.com/kusalhasintha) +### Kyaa Kats + +- Pursuing Undergraduation in IT and business. +- Loves to code and game during free time. +- [![github-alt][github-img]](https://github.com/KyaaKats) + # L ### Lauren Reilly @@ -900,6 +1022,11 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - [![twitter-alt][twitter-img]](https://twitter.com/lukasgf18) [![github-alt][github-img]](https://github.com/lukasg18) +### Lúcio Leandro +- Computer science student +- nerd, I like Free Software, musician +- [![github-alt][github-img]](https://github.com/lucioleandro) + ### Luis Chaglla - Software Engineer in Spain @@ -951,6 +1078,13 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - [![twitter-alt][twitter-img]](https://twitter.com/manishakeim) [![github-alt][github-img]](https://github.com/manishakeim) +### Marco Paulo Ollivier + +- Software Engineer +- Rio de Janeiro - Brazil +- [![twitter-alt][twitter-img]](https://twitter.com/marcopollivier) + [![github-alt][github-img]](https://github.com/marcopollivier) + ### Mathieu Jolivet (Cynferdd) - Developper as a hobby since 1996, professionaly since 2005. @@ -984,15 +1118,28 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - [![twitter-alt][twitter-img]](https://twitter.com/_mohit_yadav) [![github-alt][github-img]](https://github.com/mohityadav7) -### mkaur7999 +### Morteza Hosseini +- Yet Another Developer +- [![twitter-alt][twitter-img]](https://twitter.com/mortezism) + [![github-alt][github-img]](https://github.com/mory91) -- I am a young developer in Sri Lanka -- I'm currently a undergraduate -- My hobbies include: - - Coding - - Gaming - - Nature Photography -- [![github-alt][github-img]](https://github.com/mkaur7999) +### mkaur7999 + - I am a young developer in Sri Lanka + - I'm currently a undergraduate + - My hobbies include: + - Coding + - Gaming + - Nature Photography + - [![github-alt][github-img]](https://github.com/mkaur7999) + + ### Muh. Salman Alfansuri +- I am a web developer and student in Indonesia +- [![github-alt][github-img]](https://github.com/Alfansuri) + +### MSedate + +-I am a student majoring in software engineering. +- I like getting better at coding and board games! ### Muhammad Harits Syaifulloh @@ -1003,6 +1150,7 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - [![facebook-alt][facebook-img]](https://twitter.com/mharitss) [![github-alt][github-img]](https://github.com/askmhs) + # N ### Nikhil Singh @@ -1012,6 +1160,10 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - [![github-alt][github-img]](https://github.com/nikmufc7) [![twitter-alt][twitter-img]](https://twitter.com/creativemartial) +### Nikhil Taneja +- Just a Noob + [![github-alt][github-img]](https://github.com/itsnikhil) + ### Nabheet Madan - I'm a SAP Technical Consultant interested in #Technical stuff. @@ -1074,6 +1226,12 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - [![github-alt][github-img]](https://github.com/nomitpahuja) [![twitter-alt][twitter-img]](https://twitter.com/NomitP) +### NotoriousRebel +- Student pursuing B.S. in Computing Security. +- Passionate about learning and coding useful things. +- I enjoy python and making things more efficient. +- [![github-alt][github-img]](https://github.com/NotoriousRebel) + ### Nitish Kumar Jha - I am from Mechanical but want to start carrier in software development @@ -1118,6 +1276,12 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - [![twitter-alt][twitter-img]](https://twitter.com/pankhuri221198) [![github-alt][github-img]](https://github.com/pankhuri2211) +### Pandurx +- Application Developer and Analyst +- Working on all sorts of projects, both Open Source and Enterprise +- [![twitter-alt][twitter-img]](https://twitter.com/pandurx) + [![github-alt][github-img]](https://github.com/pandurx) + ### Patrick Sedlacek - I am a recent graduate from University and recently started my career as a developer. @@ -1159,6 +1323,21 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - C++ - Favourite Programming Language - [![github-alt][github-img]](https://github.com/prince17080) +### Pawan Singh +- Computer Science Graduate from India +- Software Engineer +- Open Source Contributor +- Love working with javaScript and Python +- Currently working on + - NodeJS + - MeteorJS + - ReactJS + - AngularJS + - MongoDB + - Python + - and sometimes Java +- [![github-alt][github-img]](https://github.com/pawansingh972) + ### Pritish Thakkar - I'm an undergraduate from Punjab engineering college @@ -1183,6 +1362,17 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - First PR! - [![github-alt][github-img]](https://github.com/pranjalsingh20) +### Priyam Mehta +- I'm 11th grade Computer Science Student. +- I am an aspiring Software Developer. +- [![github-alt][github-img]](https://github.com/priyyyamm) + +### Pritam Piyush + +- An undergraduate student +- Interests: Machine learning +- [![github-alt][github-img]](https://github.com/pritampiyush5) + # Q ### Quang Vũ Nhật @@ -1256,6 +1446,15 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - [![twitter-alt][twitter-img]](https://twitter.com/_reesea) [![github-alt][github-img]](https://github.com/reesea) +### Rex + +- Web Application Developer +- Hobbies: + - Guitar Playing + - Video Games +- [![github-alt][github-img]](https://github.com/rex-cruz) + + ### Rishabh jain - Computer Science engineering @@ -1312,6 +1511,15 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - Software Engineer from PH - [![github-alt][github-img]] (https://github.com/rjcapuno) +### Rudrangshu Nandi + +- Student, Self-taught Developer +- I am currently work on: + - Unity3D + - Nodejs + - Reactjs. +- [![github-alt][github-img]](https://github.com/Rud156) + ### Rui Li - Software Engineer in NZ @@ -1335,6 +1543,20 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - Student, Self-taught Developer - [![github-alt][github-img]](https://github.com/rachitmanchanda) +### Reddy Balakrishna + +- 2nd year CS student at GVP, Vizag. +- I like to play cricket, code. +- [![github-alt][github-img]](https://github.com/reddyBalakrishna) + +### Ruchika Salwan +- Software Engineer +- Hobbies: + - Coding :heart: + - Reading :heart: +- [![twitter-alt][twitter-img]](https://twitter.com/ruchika_salwan) + [![github-alt][github-img]](https://github.com/Ruchika8) + # S ### Sadik Kuzu @@ -1351,6 +1573,11 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - Besides coding, I love to read novels and explore different places. - [![github-alt][github-img]](https://github.com/sahilwasan000) +### Sattu + +- I am an undergraduate student. +- [![github-alt][github-img]](https://github.com/CantFindAName0001) + ### Samyak - Description about me @@ -1370,6 +1597,10 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - Apart from such inriguing concepts, I am a big fan of Data Science and reading fiction novels. - [![github-alt][github-img]](https://github.com/sralli) +### Shivam Singh +- A Nature love and an Android enthusiast + [![github-alt][github-img]](https://github.com/meditat) + ### Shivani Gupta - I'm a computer science student. @@ -1403,6 +1634,18 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - [![twitter-alt][twitter-img]](https://twitter.com/shubhamnishad97) [![github-alt][github-img]](https://github.com/shubhamnishad97) +### Sindhiya Arya + +- I am a 3rd year undergraduate student studying CSE. +- [![github-alt][github-img]](https://github.com/aryasin) + + +### Siro Canabarro + +- Python and Kotlin Lover +- [![twitter-alt][twitter-img]](https://twitter.com/sirocanabarro) + [![github-alt][github-img]](https://github.com/sirocanabarro) + ### Shubham Patil - Python-Django, Java, C++ @@ -1459,6 +1702,25 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - [![twitter-alt][twitter-img]](https://twitter.com/steroyle) [![github-alt][github-img]](https://github.com/steroyle) +### Shaurya Bagga +- Student at IIIT-Delhi, India +- I am studying Computer Science Engineering +- My hobbies are Competitive Programming, Android App Dev, and sleeping ofc. +- [![github-alt][github-img]](https://github.com/shauryabagga) + + ### Swati Singh + - Budding iOS developer and UNIX enthusiast. + - I also do projects in + - Python + - HTML + - C, C++ + - [![github-alt][github-img]](https://github.com/swatisingh45) + +### Stefanie C +- Just completed my nanodegree in Front-End Web Development +- [![github-alt][github-img]](https://github.com/histef) + + # T ### Tilak N Shenoy @@ -1511,7 +1773,7 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - Student Computer Science - Reverse engineer all the things -- [![github-alt][github-img](https://github.com/trillcosby) +- [![github-alt][github-img]](https://github.com/trillcosby) ### Tanet Pornsirirat @@ -1546,7 +1808,6 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - [![github-alt][github-img]](https://github.com/uds5501) ### Uğur Soğukpınar - - Backend Developer - Interested in Machine Learning, Deep Learning, AI - [![github-alt][github-img]](https://github.com/ugursogukpinar) @@ -1594,6 +1855,32 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - Painter - [![github-alt][github-img]](https://github.com/Vishal1541) + +### Vishal Madheshia + +- iOS Developer +- Programmer +- Expert in Swift +- [![github-alt][github-img]](https://github.com/vishalwaka) + +### Volkan Şengül +- Software Engineer +- Interest : Machine Learning +- Teaching software development on youtube +- Digital Painting +- [![github-alt][github-img]](https://github.com/volkansengul) + [![twitter-alt][twitter-img]](https://twitter.com/volkansengul) + [![youtube-alt][youtube-img]](https://youtube.com/volkansengul) + +### Apurva Vishwakarma +- I am a young developer in India +- I'm currently a undergraduate +- My hobbies include: + - Coding + - Gaming + - Playing sports +- [![github-alt][github-img]](https://github.com/iamapurva) + # W ### Wisnu Febriadi @@ -1607,7 +1894,11 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU # X # Y - +### Yaderson Patiño +- Im from Colombia .student of programing, junior web Developer, in Vue Js, Node... Javascript is amazing +- [![twitter-alt][twitter-img]](https://mobile.twitter.com/Yaderr_) + [![github-alt][github-img]](https://github.com/yaderson) + ### Yee Antonio - I am a Backend and Mobile Developer. @@ -1629,6 +1920,23 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU - I love Mathematics, good food and OOP. I am currently studying Haskell, my first functional programming language. - [![github-alt][github-img]] (https://github.com/ZornitsaAsanska) +### Zayn + +- I am Computer Science Student and I speak Java, Node and Go. +- I Love System Design and Learning new Tech. Currently I do Go. +- [![github-alt][github-img]] (https://github.com/zaynkorai) + + +### Mua Laurent + +- I am a software enthusiast , laravel addict and love solving real life scenarios using the computer. +- [![twitter-alt][twitter-img]](https://twitter.com/muaRachmann) + [![facebook-alt][facebook-img]](https://www.facebook.com/mua.Rachmann) + [![google-alt][google-img]](https://plus.google.com/u/0/110590356196093693388) + [![github-alt][github-img]](https://github.com/muarachmann) +- [Know more at](http://muarachmann.com/) + + --- ## Copyright diff --git a/_config.yml b/_config.yml index a43c7b8..390c3f4 100644 --- a/_config.yml +++ b/_config.yml @@ -1,6 +1,6 @@ theme: jekyll-theme-minimal title: My First PR -description: Helping first time contributors to make their first contribution. My First PR. +description: Helping beginners make their first contribution. My First PR. logo: https://raw.githubusercontent.com/my-first-pr/my-first-pr.github.io/master/assets/images/logo.png show_downloads: false exclude: ["code/"] diff --git a/code/AVL.py b/code/AVL.py new file mode 100644 index 0000000..d0edb75 --- /dev/null +++ b/code/AVL.py @@ -0,0 +1,180 @@ +''' +A AVL tree +''' + + +class Node: + + def __init__(self, label): + self.label = label + self._parent = None + self._left = None + self._right = None + self.height = 0 + + @property + def right(self): + return self._right + + @right.setter + def right(self, node): + if node is not None: + node._parent = self + self._right = node + + @property + def left(self): + return self._left + + @left.setter + def left(self, node): + if node is not None: + node._parent = self + self._left = node + + @property + def parent(self): + return self._parent + + @parent.setter + def parent(self, node): + if node is not None: + self._parent = node + self.height = self.parent.height + 1 + else: + self.height = 0 + + +class AVL: + + def __init__(self): + self.root = None + self.size = 0 + + def insert(self, value): + node = Node(value) + + if self.root is None: + self.root = node + self.root.height = 0 + self.size = 1 + else: + # Same as Binary Tree + dad_node = None + curr_node = self.root + + while True: + if curr_node is not None: + + dad_node = curr_node + + if node.label < curr_node.label: + curr_node = curr_node.left + else: + curr_node = curr_node.right + else: + node.height = dad_node.height + dad_node.height += 1 + if node.label < dad_node.label: + dad_node.left = node + else: + dad_node.right = node + self.rebalance(node) + self.size += 1 + break + + def rebalance(self, node): + n = node + + while n is not None: + height_right = n.height + height_left = n.height + + if n.right is not None: + height_right = n.right.height + + if n.left is not None: + height_left = n.left.height + + if abs(height_left - height_right) > 1: + if height_left > height_right: + left_child = n.left + if left_child is not None: + h_right = (right_child.right.height + if (right_child.right is not None) else 0) + h_left = (right_child.left.height + if (right_child.left is not None) else 0) + if (h_left > h_right): + self.rotate_left(n) + break + else: + self.double_rotate_right(n) + break + else: + right_child = n.right + if right_child is not None: + h_right = (right_child.right.height + if (right_child.right is not None) else 0) + h_left = (right_child.left.height + if (right_child.left is not None) else 0) + if (h_left > h_right): + self.double_rotate_left(n) + break + else: + self.rotate_right(n) + break + n = n.parent + + def rotate_left(self, node): + aux = node.parent.label + node.parent.label = node.label + node.parent.right = Node(aux) + node.parent.right.height = node.parent.height + 1 + node.parent.left = node.right + + + def rotate_right(self, node): + aux = node.parent.label + node.parent.label = node.label + node.parent.left = Node(aux) + node.parent.left.height = node.parent.height + 1 + node.parent.right = node.right + + def double_rotate_left(self, node): + self.rotate_right(node.getRight().getRight()) + self.rotate_left(node) + + def double_rotate_right(self, node): + self.rotate_left(node.getLeft().getLeft()) + self.rotate_right(node) + + def empty(self): + if self.root is None: + return True + return False + + def preShow(self, curr_node): + if curr_node is not None: + self.preShow(curr_node.left) + print(curr_node.label, end=" ") + self.preShow(curr_node.right) + + def preorder(self, curr_node): + if curr_node is not None: + self.preShow(curr_node.left) + self.preShow(curr_node.right) + print(curr_node.label, end=" ") + + def getRoot(self): + return self.root + +t = AVL() +t.insert(1) +t.insert(2) +t.insert(3) +# t.preShow(t.root) +# print("\n") +# t.insert(4) +# t.insert(5) +# t.preShow(t.root) +# t.preorden(t.root) \ No newline at end of file diff --git a/code/Aastha2107.html b/code/Aastha2107.html new file mode 100644 index 0000000..f35ff8b --- /dev/null +++ b/code/Aastha2107.html @@ -0,0 +1,11 @@ + + + + + + my first webpage + + +

hello world!

+ + diff --git a/code/Ashik.js b/code/Ashik.js index c1cab36..96befc9 100644 --- a/code/Ashik.js +++ b/code/Ashik.js @@ -1,2 +1,2 @@ -document.write("Hello World!"); +document.write("Hello World"); document.write("I am Ashik Paul. I am a Web Developer"); diff --git a/code/BoardPath.java b/code/BoardPath.java new file mode 100644 index 0000000..60a5880 --- /dev/null +++ b/code/BoardPath.java @@ -0,0 +1,37 @@ +import java.util.ArrayList; +import java.util.Scanner; + +public class getBoardPath { + + public static void main(String[] args) { + Scanner scn = new Scanner(System.in); + System.out.println("Enter Current Position:"); + int n1= scn.nextInt(); + System.out.println("Enter Destination Position:"); + int n2= scn.nextInt(); + System.out.println(GetBoardPath(n1, n2)); + + } + + public static ArrayList GetBoardPath(int curr, int end) { +// Returns all snake & ladder board paths from curr to end + if (curr == end) { + ArrayList basePositive = new ArrayList<>(); + basePositive.add("\n"); + return basePositive; + } + if (curr > end) { + ArrayList baseNegative = new ArrayList<>(); + return baseNegative; + } + ArrayList MyResult = new ArrayList<>(); + for (int dice = 1; dice <= 6; dice++) { + ArrayList RecResult = GetBoardPath(curr + dice, end); + for (String RecResultString : RecResult) { + MyResult.add(dice + RecResultString); + } + } + return MyResult; + } + +} \ No newline at end of file diff --git a/code/FILES-BINARY-IN-C-PLUS-PLUS.cpp b/code/FILES-BINARY-IN-C-PLUS-PLUS.cpp new file mode 100644 index 0000000..9169f5f --- /dev/null +++ b/code/FILES-BINARY-IN-C-PLUS-PLUS.cpp @@ -0,0 +1,26 @@ +/* WORKING FIRST FILE BINARY */ +#include +#include +using namespace std; +int main(){ + char msg[100]; + ofstream escritura("File1.txt"); + if(escritura.fail()){ + cout<<"Error in FILE"; + }else{ + cout<<"FILE Successfully generated"<> ar; + cout< +int main() +{ + printf("Hello, World!"); + return 0; +} diff --git a/code/Hello_World_Janitha.java b/code/Hello_World_Janitha.java new file mode 100644 index 0000000..206d6fe --- /dev/null +++ b/code/Hello_World_Janitha.java @@ -0,0 +1,6 @@ +public class HelloWorld { + public static void main( String[] args ) { + System.out.println( "Hello World!" ); + System.exit( 0 ); + } +} diff --git a/code/Rud156.cs b/code/Rud156.cs new file mode 100644 index 0000000..ce70047 --- /dev/null +++ b/code/Rud156.cs @@ -0,0 +1,7 @@ +using System; + +class Hacktoberfest2k18 { + public static void Main (string[] args) { + Console.WriteLine ("Hello World!!"); + } +} diff --git a/code/Wafgar.md b/code/Wafgar.md new file mode 100644 index 0000000..7cc0105 --- /dev/null +++ b/code/Wafgar.md @@ -0,0 +1 @@ +ntg diff --git a/code/afiq3821-gaktau.java b/code/afiq3821-gaktau.java new file mode 100644 index 0000000..7243df7 --- /dev/null +++ b/code/afiq3821-gaktau.java @@ -0,0 +1,48 @@ +package com.blogspot.blogsetyaaji.androidlanjutan; + +import android.content.Intent; +import android.os.Bundle; +import android.speech.RecognizerIntent; +import android.support.v7.app.AppCompatActivity; +import android.widget.Button; +import android.widget.EditText; +import android.widget.Toast; + +import java.util.Locale; + +import butterknife.BindView; +import butterknife.ButterKnife; +import butterknife.OnClick; + +public class SttActivity extends AppCompatActivity { + + @BindView(R.id.edTs) + EditText edTs; + @BindView(R.id.btnStt) + Button btnStt; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_stt); + ButterKnife.bind(this); + } + + @OnClick(R.id.btnStt) + public void onViewClicked() { + prosesSuara(); + } + + private void prosesSuara() { + Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); + intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,RecognizerIntent.LANGUAGE_MODEL_FREE_FORM); + intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE,new Locale("in","INA")); + intent.putExtra(RecognizerIntent.EXTRA_PROMPT,"Start Speak"); + + try { + startActivity(intent, ); + }catch (Exception e){ + Toast.makeText(this, getString(R.string.tts_error), Toast.LENGTH_LONG); + } + } +} diff --git a/code/afiq3821.java b/code/afiq3821.java new file mode 100644 index 0000000..7243df7 --- /dev/null +++ b/code/afiq3821.java @@ -0,0 +1,48 @@ +package com.blogspot.blogsetyaaji.androidlanjutan; + +import android.content.Intent; +import android.os.Bundle; +import android.speech.RecognizerIntent; +import android.support.v7.app.AppCompatActivity; +import android.widget.Button; +import android.widget.EditText; +import android.widget.Toast; + +import java.util.Locale; + +import butterknife.BindView; +import butterknife.ButterKnife; +import butterknife.OnClick; + +public class SttActivity extends AppCompatActivity { + + @BindView(R.id.edTs) + EditText edTs; + @BindView(R.id.btnStt) + Button btnStt; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_stt); + ButterKnife.bind(this); + } + + @OnClick(R.id.btnStt) + public void onViewClicked() { + prosesSuara(); + } + + private void prosesSuara() { + Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); + intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,RecognizerIntent.LANGUAGE_MODEL_FREE_FORM); + intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE,new Locale("in","INA")); + intent.putExtra(RecognizerIntent.EXTRA_PROMPT,"Start Speak"); + + try { + startActivity(intent, ); + }catch (Exception e){ + Toast.makeText(this, getString(R.string.tts_error), Toast.LENGTH_LONG); + } + } +} diff --git a/code/aka4rKO.exe b/code/aka4rKO.c similarity index 100% rename from code/aka4rKO.exe rename to code/aka4rKO.c diff --git a/code/doublylinklist.cpp b/code/doublylinklist.cpp new file mode 100644 index 0000000..03f913b --- /dev/null +++ b/code/doublylinklist.cpp @@ -0,0 +1,193 @@ +#include +#include +#include + +struct node +{ + + int id ; + char name[20]; + struct node*prev; + struct node*next; + + +}; + + +node*temp,*start=NULL,*last=NULL; + + +void creation(); +void deletion(); +void display(); + + +int main() +{ + int decision; + int ch; + ch=1; + while(ch==1) +{ + + printf(" \n 1.CREATE A NEW CONSUMER RECORD \n 2.DELETE A RECORD \n 3.DISPLAY \n 4.EXIT \n"); + + printf("\n ENTER YOUR CHOICE "); + scanf("%d", &decision); + + + switch(decision) + { + + case 1 : creation(); + break; + + + case 2 : deletion(); + break; + + + case 3 : display(); + break; + + + case 4 : exit(0); + + + } + +} + return 0; +} + + +void creation() +{ + + int ch; + ch=1; + + while(ch==1) + + { + + + temp= (node*)malloc(sizeof(node)); + + printf(" ENTER THE CONSUMER ID : "); + scanf("%d",&temp->id); + + printf(" ENTER THE CONSUMER NAME : "); + scanf("%s",&temp->name); + + + if(start==NULL) + { + temp->prev=NULL; + temp->next=NULL; + start=last=temp; + } + + + else + { + temp->next=start; + start->prev=temp; + + start=temp; + + + } + + printf(" WANT TO ENTER MORE (0/1) : "); + scanf("%d",&ch); + +} + +} + +void deletion() +{ + + if(start==NULL) + { + printf(" NO DATA TO DELETE"); + + + } + + else + { + + temp=start; + node*temp2; + + while(temp->next!=NULL) + { + temp2=temp; + + temp=temp->next; + + + } + + temp2->next=NULL; + + + } + + +} + +void display() +{ + temp=start; + + while(temp!=NULL) + { + + printf(" C.NAME : %s C.ID : %d -->", temp->name,temp->id) ; + + temp=temp->next; + + } + + printf("NULL \n"); + +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/code/gabr.py b/code/gabr.py new file mode 100644 index 0000000..c4685b1 --- /dev/null +++ b/code/gabr.py @@ -0,0 +1,2 @@ +print("Ola, mundo!") +print("It is \"Hello, world\" in portuguese (Brazil) ") \ No newline at end of file diff --git a/code/hello.elm b/code/hello.elm new file mode 100644 index 0000000..5ea74fb --- /dev/null +++ b/code/hello.elm @@ -0,0 +1,7 @@ +module Hello exposing (..) + +import Html exposing (text) + + +main = + text "Hello World!" \ No newline at end of file diff --git a/code/hello.html b/code/hello.html new file mode 100644 index 0000000..2c7c8df --- /dev/null +++ b/code/hello.html @@ -0,0 +1,6 @@ + +
Hello world.
+ +

Hello, world!

+ + diff --git a/code/helloNewWorld.py b/code/helloNewWorld.py new file mode 100644 index 0000000..1c584ba --- /dev/null +++ b/code/helloNewWorld.py @@ -0,0 +1,3 @@ +#New Hello World Code in Python +print("Hello World! This is Hacktober 2018! Enjoy!") + diff --git a/code/sort.js b/code/sort.js new file mode 100644 index 0000000..1fba239 --- /dev/null +++ b/code/sort.js @@ -0,0 +1,22 @@ +function (arr) { + function swap(i, j) { + let temp = arr[i]; + arr[i] = arr[j]; + arr[j] = temp; + } + let n = arr.length; + let sw = true; + let x = 0; + while (sw) { + sw = false; + x = x + 1; + for (let i = 1;i<=(n-x);i++) { + if (arr[i - 1] > arr[i]) { + swap(i - 1, i); + sw = true; + } + } + + } + return arr +} diff --git a/code/vimuDeshan.cpp b/code/vimuDeshan.cpp new file mode 100644 index 0000000..ed642a6 --- /dev/null +++ b/code/vimuDeshan.cpp @@ -0,0 +1,8 @@ +#include +using namespace std; + +int main() +{ + cout <<"\nHello World"<< endl; + return 0; +}