Name an advantage of array over linked list?
Answer Posted / neha
Inserting and deleting elements is easier in array compared
to linked list.
In array, inserting element just requires incrementing the
next element by 1 and giving its previous index to new
element added. And deleting requires giving the element
which is after the element to b deleted an index one less to it.
But in linked list, link hs to be attached to p->next->next...
etc etc..
| Is This Answer Correct ? | 8 Yes | 13 No |
Post New Answer View All Answers
What is oops?what is its use in software engineering?
What is coupling in oops?
What is polymorphism explain its types?
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)
What are the 3 principles of oop?
What is abstraction in oop?
What does and I oop mean?
can inline function declare in private part of class?
Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.
What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }
There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.
What is for loop and its syntax?
What is multilevel inheritance?
What do you mean by abstraction?
Can we create object of interface?