Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
C++ program for this algo
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Abhishek Jaiswal
10y
1.3k
1
Reply
Algorithm 3.
(inserting into a linear array)INSERT(LA,N,K,ITEM) Here LA is a linear array with N elements and K is a positive integer such that K<=N.This algorithm inserts an element ITEM into the Kth Position in LA. 1.[Initialize counter.]set j:= N. 2.Repeat steps 3 and 4 while j >= K. 3. [Move jth element downward.] set LA[j+1] := LA [j]. 4.[Decrease counter.] set j := j -1. [End of step 2 loop] 5. [insert element] set LA[K] := ITEM. 6.[Reset N] set N:=N +1 7.Exit
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
C++ program for this algo
Statement missing