Confused about implementing data structures in real problems?
See some real-world examples of the Data structure "Array" today 👇
A thread 🧵
🔸A parking lot is an example of an array with each index of the array storing whether a car is present or not. Or it may be used for some other functionality.
🔸Phone contacts stored in a sorted array
🔸Details of all the employees in a company stored in a database and fetched through an array
🔸Linear searching or binary search some paper from a collection(array) kept in some order
🔸No of units of each item currently available in a shopping mall stored in an array
🔸Chess is a 2D array of 8*8
🔸Rubix cube is an example of 3d array
🔸Seats in a lecture hall is an example of 2d array
🔸Collection of all music songs in your phone stored in an array
🔸Details of all the books available in a library stored in an array
🔸Bank locker
🔸Egg cartons
🔸Marks of each student in a class is stored in an array
🔸To encode and decode data in encryption we need matrices (2d arrays). There is a key that helps encode and decode data which is generated by matrices
🔸Construction of buildings can be done with matrices. A matrix is made of rows and columns you can change the number of rows and columns within a matrix. Matrices can help support various historical structures.
🔸A 2D digital image is a collection of pixels stored in a 2d array.
This is the end of the thread.
Real-life examples for other data structures coming soon. Be sure to give a follow to @meetjain74
After making m1 = null m1 becomes eligible for garbage collection. So when we call garbage collector the first time, Garbage Collector will call finalize() method on m1 before destroying it.
The finalize method will print "Finalise" here but in finalize method we are again referencing the same object by m which makes it no longer eligible for garbage collection. Hence the garbage collector will not destroy the object.
Want to become an Android developer or start your journey with Android development but have not started yet?
Let me help you create your first Android app to kick off your Android journey.
Work with me to the end of the thread 🧵🧵
First, download Android Studio on your PC through this link and complete the setup and wait for all indexing and initial build to finish (might take time so keep patience) developer.android.com/studio
🔸Click on create new Project
🔸Select Empty Activity
🔸Click on next