Please support our C advertiser: Programming Forums
![]() |
•
•
Join Date: Sep 2005
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
hai , i am chandu. i have some doubts in datastructures.can anyone help me to solve them
1) what datastructure (stack,queue.list......) is used for NOTEPAD ,(i want the best datastructure) and why?
2)what is the best datastructure used for MICROSOFTWORD and why?
3)how can we delete duplicate elements in an array with o(n) time complexity?(i want the code or algorithm)
1) what datastructure (stack,queue.list......) is used for NOTEPAD ,(i want the best datastructure) and why?
2)what is the best datastructure used for MICROSOFTWORD and why?
3)how can we delete duplicate elements in an array with o(n) time complexity?(i want the code or algorithm)
•
•
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 11,865
Reputation:
Rep Power: 40
Solved Threads: 1013
•
•
Join Date: Aug 2005
Posts: 80
Reputation:
Rep Power: 4
Solved Threads: 2
•
•
•
•
Originally Posted by Ancient Dragon
3)how can we delete duplicate elements in an array with o(n) time complexity?(i want the code or algorithm)
Easy. Go to the spot in the array where you want to delete the element. Copy the next element in the array to that spot, move to the next element. Repeat the process until you get to the end of the array. It is big O of n because in the worst case you delete the first element in the array, and you end up iterating through the entire array of size n.
-Fredric
![]() |
Similar Threads
Other Threads in the C Forum
- observing People (IT Professionals' Lounge)
- What's better? Windows 2000 Server or Linux Server? (Windows Servers and IIS)
- Not enjoying computer science (IT Professionals' Lounge)
- Philosophies on Theology? (Geeks' Lounge)
- Microsoft Windows Longhorn Confirmed Leaked! (IT Professionals' Lounge)
Other Threads in the C Forum
- Previous Thread: help...reading
- Next Thread: heap storage
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)






Linear Mode