In Programming many times we have to store and work with the data. But choosing the right way of storing is important.
Array is one of the most simple and effective way of storing list of data.Now we have to multiple array of data. Ohh! that sounds easy we can use 2 Dimensional Array.
I agree 2 Dimensional array is suitable but I have arrays of variable lengths. So simply creating 2-D Array will not be efficient because I have to specify the column size as the highest of my arrays. So there will be lot of unused space.
The good solution can be Dynamic 2D Array with variable columns. Also Array of vectors can also be used. But we are not discussing about STL.
Algorithm:
- Create a ptr to ptr to ptr with the name of your 2D Array to hold the Array of Pointers.
- Now create an Array of pointers depending on the no of rows and store the base address on the ptr to ptr.
- For every Row allocate the required memory and store the address in the array of pointers.
- You own the 2D Dynamic Array with Dynamic Rows and Columns.
Implementation:
I have done it in c++. But your choice may vary.
You can play with this list at your own choice..
Popular posts from this blog
Important : Here we compared Wordpress.com and not Wordpress.org Introduction: First speaking of blogger. It was developed in Pyra labs then later acquired by Internet giant Google. This is completely free blogging platform written in Python. It integrates with most of google services. I am using blogger for the past two years. It is very compact and comfortable. After speaking about Wordpress. It is developed by Automattic,Inc powered by opensource CMS(Content Management System) Wordpress written in php. It has very fine features such as landing page, sliders, etc. This is also a free platform but you have an option to get premium service too. I think this intro is good enough. Now let compare their features. Blogger Features: Just one google account is good enough to do anything. Integrates into your Gdrive, Photos,Google+. E-mail feeds are very easy to setup with Google owned Feed Burner service. Simplified user interface. ...
If you are looking for how to find your product key?. Then this is the perfect guide for you. First your windows product key is not visible in PC Info. So to reveal that you have few methods. I will tell you how to find it without any ease. Open command prompt by pressing WIN + R and typing cmd . This will open the command prompt. Now type wmic path softwarelicensingservice get OA3xOriginalProductKey or you can copy it and paste by right clicking on command prompt. Now press enter. You got your key
|
Comments
Post a Comment