-
๐ญ Iโm currently working on my personal development project and other things
-
๐ฑ Iโm currently learning about Typescript, Microservices related topics
-
๐จโ๐ป All of my projects are available at My repositories
-
๐ฌ Ask me about react and javascript or it can be MERN stack
-
๐ซ How to reach me [email protected]
data-structures-and-algorithms's Introduction
data-structures-and-algorithms's People
Forkers
bitquality manthanmkulakarni rhutomo shiva-krishna yulanl22 jamesjaj paramjeetdhiman tushar-sharma1 cloudhananim goutamiuppu mahmud-soft ai7pfru luiscarlosjunior eyohannesmason harish24ms eliyaaah pooja1198 renieph gbenamy i-prashanth-s gagan-jakhu khassenalisher punam-jasud allenabraham999 kush-daga skrk536 arunsinghsnd anujsoni08 sreenevaas weikongwei hoanf prajput35 baisilg hancovisagie jyotiradityasinghrathore santoshs0612 myhmeiyuanhuang omar-hosni justinjenish krimid chall88 utsavll0 minimayank gogi2712 mahathi1404 manevivek gurutu harshil-gupta ioabhishek om-mahawar bhaswatib saurav1423 rbnhd swapnilmall gaminee prasadm07 ayush-oberoi zitong-xu devlearning9874 manhalrahman utsukushiihime harshiiash derekrsargent satadalmazumdar untilhamza ny20 sunwoongc developer-hosny avina-jain amitbhalerao jigmetnamgyal cneal111 shadown sharmarajan fazalkhan14 corazhang saikrishnamasetti manjunathshiva ibrajber99 pshweta13 shadkhan37 k1ngalpha sachin3973 velkur-bharath daniel-sogbey partofheartpri10 belide tushank-panchal ramanandkmr18 nagamruta nowshad7 gitjeet moyise solaris1712 sbaah khansaleemahmed frt92 yaseenbabamohd harshchan eeshasrivastavadata-structures-and-algorithms's Issues
Error in Data-Structures-and-Algorithms/blob/master/Arrays-Implementation/arrays/main.cpp
In Data-Structures-and-Algorithms/blob/master/Arrays-Implementation/arrays/main.cpp, the get method, I think that we should test index < totalNumbers rather than index < capacity. Here is a reference: https://www.geeksforgeeks.org/how-to-implement-our-own-vector-class-in-c/.
Data Structures and Algorithms C/C++
Add methods to access Linked List elements
Implement a get()
method to access the element at a certain index of the Linked List and a find()
method to search for an element with a specific value and return its index.
[LOGIC] - BST REMOVE NODE
In the below code snippet from BST under the deleteNode
function. The logic is quite unclear for me like how it is working for the below case.
Root
/ \
child1 child2
/ \
Null leaf1
Code Snippet
else if (temp->left == NULL || temp->right == NULL)
{
cout << "We are deleting parent node which have one child" << endl;
if (temp->left != NULL)
{
parent->left = temp->left;
}
else
{
parent->right = temp->right;
}
free(temp);
return;
}
If you can put light on it then it would be a great help :)
Delete Function [BST]
cout << "Deleting Node which has two children" << endl;
// in this case we need to find the pre-order successor.
Node *t = temp->right;
if (t->left == NULL && t->right == NULL)
{
temp->data = t->data;
temp->right = NULL;
free(t);
return;
}
else if (t->left == NULL && t->right != NULL)
{
temp->data = t->data;
temp->right = t->right;
free(t);
return;
}
while (t->left != NULL)
{
parent = t;
t = t->left;
}
temp->data = t->data;
parent->left = NULL;
free(t);
return;
In the above code snippet of the Delete function from BST. Please mention cases that we are handling.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.