Merge branch 'master' into master

This commit is contained in:
Greg Holmes 2018-10-10 14:35:42 +01:00 committed by GitHub
commit 4b0f41feb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 1010 additions and 43 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ _site/
.jekyll-cache/
.jekyll-metadata
README.md.bak
.idea/

View File

@ -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.

357
README.md
View File

@ -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)
@ -80,6 +80,10 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
[![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
- UI Designer, Frontend Developer
@ -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
@ -580,7 +633,12 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
- [![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:
### 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)
- [![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,12 +1323,37 @@ 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
- My favourite programming language is C++ and I'm a sport programmer.
- [![github-alt][github-img]](https://github.com/ma5terdrag0n)
### Philamer Sune
- I hammer keyboard for a living.
- Love working on:
- Python
- Docker
- DroneCI
- Alexa Skills Kit
- [![github-alt][github-img]](https://github.com/pvsune)
### Pijus Rancevas
- Software Engineering student with background in arts.
@ -1183,6 +1372,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
@ -1262,6 +1462,14 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
- I am a web developer.
- [![github-alt][github-img]](https://github.com/rehanj)
### Rex
- Web Application Developer
- Hobbies:
- Guitar Playing
- Video Games
- [![github-alt][github-img]](https://github.com/rex-cruz)
### Rishabh jain
- Computer Science engineering
@ -1313,6 +1521,20 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
- I like reading and watching tv series
- [![github-alt][github-img]](https://github.com/roxyoanes)
## Rj Capuno
- 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
@ -1336,6 +1558,26 @@ 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)
### Rohit Kumar
- Undergrad IIITian, Self-taught Developer and Competetive coder, Machine Learning enthusiast
- Loves poetry
- [![github-alt][github-img]](https://github.com/aquatiko)
### 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
@ -1352,6 +1594,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
@ -1371,6 +1618,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.
@ -1404,6 +1655,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++
@ -1460,6 +1723,28 @@ 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)
### Siddharth Dhanuka
- Backend developer and aspiring to be a Data Scientist
- [![github-alt][github-img]](https://github.com/siddhanuka)
### 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
@ -1512,7 +1797,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
@ -1547,7 +1832,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)
@ -1595,6 +1879,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
@ -1608,6 +1918,10 @@ 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
@ -1630,6 +1944,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

View File

@ -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/"]

180
code/AVL.py Normal file
View File

@ -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)

11
code/Aastha2107.html Normal file
View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>my first webpage</title>
</head>
<body>
<p>hello world!</p>
</body>
</html>

View File

@ -1,2 +1,2 @@
document.write("Hello World!");
document.write("Hello World");
document.write("I am Ashik Paul. I am a Web Developer");

37
code/BoardPath.java Normal file
View File

@ -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<String> GetBoardPath(int curr, int end) {
// Returns all snake & ladder board paths from curr to end
if (curr == end) {
ArrayList<String> basePositive = new ArrayList<>();
basePositive.add("\n");
return basePositive;
}
if (curr > end) {
ArrayList<String> baseNegative = new ArrayList<>();
return baseNegative;
}
ArrayList<String> MyResult = new ArrayList<>();
for (int dice = 1; dice <= 6; dice++) {
ArrayList<String> RecResult = GetBoardPath(curr + dice, end);
for (String RecResultString : RecResult) {
MyResult.add(dice + RecResultString);
}
}
return MyResult;
}
}

View File

@ -0,0 +1,26 @@
/* WORKING FIRST FILE BINARY */
#include <iostream>
#include <fstream>
using namespace std;
int main(){
char msg[100];
ofstream escritura("File1.txt");
if(escritura.fail()){
cout<<"Error in FILE";
}else{
cout<<"FILE Successfully generated"<<endl;
cout<<"Msg: ";
fflush(stdin);
gets(msg);
escritura<<msg;
}
escritura.close();
/* cout<<"Archivo -- close"<<endl;
char ar[100];
ifstream lectura("archivo1.txt");
lectura >> ar;
cout<<ar<<endl;
lectura.close();
*/
}

10
code/HelloWOrld.cs Normal file
View File

@ -0,0 +1,10 @@
// Hello World! program C#
namespace HelloWorld
{
class Hello {
static void Main(string[] args)
{
System.Console.WriteLine("Hello HacktoberFest!");
}
}
}

3
code/HelloWorld.hs Normal file
View File

@ -0,0 +1,3 @@
main :: IO()
main = do
putStrLn("Hello World ! I am Amintas :)")

6
code/HelloWorld.java Normal file
View File

@ -0,0 +1,6 @@
public class HelloWorld{
public static void main(String[] args){
System.out.println("Hello World from India!");
}
}

1
code/HelloWorld.swift Normal file
View File

@ -0,0 +1 @@
print("Hello World!")

8
code/HelloWorld_jatin.py Normal file
View File

@ -0,0 +1,8 @@
//Jatin Aggarwal
#include <stdio.h>
int main()
{
printf("Hello, World!");
return 0;
}

View File

@ -0,0 +1,6 @@
public class HelloWorld {
public static void main( String[] args ) {
System.out.println( "Hello World!" );
System.exit( 0 );
}
}

7
code/Rud156.cs Normal file
View File

@ -0,0 +1,7 @@
using System;
class Hacktoberfest2k18 {
public static void Main (string[] args) {
Console.WriteLine ("Hello World!!");
}
}

1
code/Wafgar.md Normal file
View File

@ -0,0 +1 @@
ntg

48
code/afiq3821-gaktau.java Normal file
View File

@ -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);
}
}
}

48
code/afiq3821.java Normal file
View File

@ -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);
}
}
}

193
code/doublylinklist.cpp Normal file
View File

@ -0,0 +1,193 @@
#include<stdlib.h>
#include<stdio.h>
#include<malloc.h>
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");
}

2
code/gabr.py Normal file
View File

@ -0,0 +1,2 @@
print("Ola, mundo!")
print("It is \"Hello, world\" in portuguese (Brazil) ")

7
code/hello.elm Normal file
View File

@ -0,0 +1,7 @@
module Hello exposing (..)
import Html exposing (text)
main =
text "Hello World!"

6
code/hello.html Normal file
View File

@ -0,0 +1,6 @@
<html>
<header><title>Hello world.</title></header>
<body>
<p>Hello, world!</p>
</body>
</html>

3
code/helloNewWorld.py Normal file
View File

@ -0,0 +1,3 @@
#New Hello World Code in Python
print("Hello World! This is Hacktober 2018! Enjoy!")

22
code/sort.js Normal file
View File

@ -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
}

8
code/vimuDeshan.cpp Normal file
View File

@ -0,0 +1,8 @@
#include <iostream>
using namespace std;
int main()
{
cout <<"\nHello World"<< endl;
return 0;
}