awsdocs /
aws-doc-sdk-examples
Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.md file below.
90/100 healthLoading repository data…
Vibhav-Gopal / repository
This repo, contains C++ code, to take an array of integers, convert it to a Binary Search Tree, and Balance it so the BST is optimized for BST Functions. This repo also includes a Python Script, that takes the Preorder traversal of a BST and shows it graphically
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
This repo, contains C++ code, to take an array of integers, convert it to a Binary Search Tree, and Balance it so the BST is optimized for BST Functions. This repo also includes a Python Script, that takes the Preorder traversal of a BST and shows it graphically
You have an array of integers, which you want to convert to an optimised Binary Search Tree, how do you do it?
PyQt6 for generating GUI treeint nums[] = {numbers_here};
Modify the array to suit your numbers, No two numbers must be the same
Before Balancing, inorder and preorder traversals of tree are
Inorder: 1 2 7 10 11 13 200
Preorder: 1,2,7,10,11,13,200,
After balancing, the inorder and preorder traversals are
Inorder: 1 2 7 10 11 13 200
Preorder: 10,2,1,7,13,11,200, Paste this into the preorder list in the python script
3 is the depth
This is an example output, the output is pretty self-explanatory. The program outputs both the inorder and preorder traversals, so manual reconstruction of the tree is possible, if needed. However, a Binary Search Tree can be reconstructed from only its preorder traversal, by nature of Binary Search Trees.
preorderpreorder = [paste_here]
To customise how the output looks,
spreadFactor value and layerDist Value in the python script, the code snippet is shown below. spreadFactor controls how far the nodes are spread apart on the X axis, whereas layerDist controls how far the layers of the tree are on the Y axisfor layerNum in range(len(layers)):
renderLayer(nodesInLayer=layers[layerNum],
spreadFactor=5, layerNum=layerNum, layerDist=50)
makeNode()brush = QBrush(Qt.GlobalColor.white)
pen = QPen(Qt.GlobalColor.black)
pen.setWidth(2)
makeNode()scene.addItem(ellipse)
To modify text styling
To change the text styling, modify the QGraphicsTextItem object attributes in renderTexts(), refer to PyQt6 documentation for instructions on how to do that.
Window Layout To change the size of the window, modify the lines of code
width = 1000
height = 400
Future plans
There are a lot of helper functions written in trees.h, go through them if you wanna know more.
Selected from shared topics, language and repository description—not editorial ratings.
awsdocs /
Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.md file below.
90/100 healthNELSONZHAO /
This repo contains the source code in my personal column (https://zhuanlan.zhihu.com/zhaoyeyu), implemented using Python 3.6. Including Natural Language Processing and Computer Vision projects, such as text generation, machine translation, deep convolution GAN and other actual combat code.
83/100 healthlarymak /
This repositories contains a list of python scripts projects from beginner level advancing slowly. More code snippets to be added soon. feel free to clone this repo
87/100 healthcdk-patterns /
This is intended to be a repo containing all of the official AWS Serverless architecture patterns built with CDK for developers to use. All patterns come in Typescript and Python with the exported CloudFormation also included.
88/100 healthsachin-source /
This repository contains a list of important and useful github repos which a developer, coder, a student should never miss to look at.
88/100 healthabidrahmank /
This repo contains tutorials on OpenCV-Python library using new cv2 interface
65/100 health