Please Login to Continue

Stress Relief (Eucalytus + Spearmint) With Natural

Stress Relief (Eucalytus + Spearmint) With Natural

$25.00

iwatch band (silicon strap for Apple Watch band 44 mm/40mm) Sports bracelet Rubber Watchband

iwatch band (silicon strap for Apple Watch band 44 mm/40mm) Sports bracelet Rubber Watchband

$3.00

Your Pregnancy & Birth ( fourth Edition)

Your Pregnancy & Birth ( fourth Edition)

$10.00

Insert Data in Array In Style

When I was reading about Stacks data structure, I found something interesting when trying to insert data into an array, dictionary or a list. Simply increment the index inside the array or Hashmaps/Hashtable like this code below. This reminds me of college when Software Developer students are trying to find the simplest way to implement the code. Awesome!!

Let explain why this function is beautiful, it's elegant and first of all, it's a boolean. Which means it can do three things at one time. You can call it and pass a parameter to insert into an array, it can reject an insertion and you can call it to know if it inserted or no.

 Push(data)                    (top >= MAX)                                            false                                                                    true                    
Technology published

Was this page helpful?

Yes Yes! this solution to the problem was helpful. No No! this solution to the problem was not helpful..



© 2020 - ErnesTech - Privacy