Две лабораторные работы на Python: Heap, Hash table
15 USDДобрый день! Нужно срочно (до полуночи 29го Апреля) выполнить следующие 2 задания (у меня есть автоматический тестер и шаблоны).
Нужно написать задания как будто их писал новичок (вы им были)!
Также, нужны комментарии, чтобы я понимал что происходит и почему.
Спасибо вам и удачи!
1. Heap
A class called MyHeap is given. Implement the follow methods: __init__(self, array) creates the initial array and build the heap using the O(n) method; insert(self, data) should insert a new element in the heap; heapify(self) should ensure that the heap property is maintained after insertion; extractFirst() should return the first element of the heap; __len__() should return the size of the heap in O(1); getData(self) should return the array.
You should use a single list to fill data.
You may not use heapq to implement this.
2. HashTable
A class called MyHashTable is given. Implement a constructor that takes two parameters: one is the size of the table to be constructed; the other a function called hash1. Implement a method put(key, data) where it hashes the key using the hash1 method, stores the data in a single list, and then return True if successfull, otherwise return False. Nothing should be done in the event of a hash collision - no data can be overwritten, and no secondary storage method should be introduced.
A class called MyChainTable that extends MyHashTable is given. Implement a constructor that takes two parameters: one is the size of the table to be constructed; the other a function called hash1. Implement a method put(key, data) where it hashes the key using the hash1 method, stores the (key, data) as a tuple in a list at the associated hash value, and should always return True.
A class called MyDoubleHashTable that extends MyHashTable is given. Implement a constructor that takes three parameters: the size of the table to be constructed; a function called hash1; and another function called hash2. Implement a method put(key,data) where it hashes the key using has1 method, stores data in a single list, and in the case where there is a collision, use the hash2 function get the offset step. Your implementation should account for if the table is full or when it cannot find a place to insert. These two cases should result in a return of False and True when the insert is successful.
Client's review of cooperation with freelancer
Две лабораторные работы на Python: Heap, Hash tableA great freelancer, one of the best I had to work with. Our second project together - if I have a job on his specialization, I will definitely contact him.
1 . Very well-known, understands the essence of the problems.
2nd Works quickly and quality.
Three Creates a good, understandable, effective code.
4 . Easy and productive to communicate
Freelancer's review of cooperation with Yevgeny Kuznetsov
Две лабораторные работы на Python: Heap, Hash tableWork pleasantly, some misunderstandings occurred during the project, but we could quickly solve them, a very adequate employer.
![]()
Current freelance projects in the category Python
Development of Backend core (Python), Telegram FSM engine, and Stripe integrationWe are looking for an experienced Backend Developer (Middle/Senior) to create an independent Headless core for an EdTech product. The system operates on a strict monthly subscription model. The core logic must be completely isolated from the content. All development is conducted… Python, Databases & SQL ∙ 15 hours 24 minutes back ∙ 30 proposals |
Development of a web service with paid access to an online chatGood day, it is necessary to develop a web service that includes: * personal links for users; * a page with a description of the service; * payment through PayPal; * online real-time chat; * video display on the user page; * accounting for paid time and automatic access… Python, Web Programming ∙ 20 hours 57 minutes back ∙ 62 proposals |
Application developmentI wish to create a mobile application for communication, the app should have audio and video calls, group chat creation, the ability to sync with phone contacts, account settings: email binding, 2FA, phone number, the ability to customize app notifications, change the app… Java, Python ∙ 1 day 18 hours back ∙ 35 proposals |
Setting up two-way integration of WhatsApp with Odoo CRMHello! We are looking for a specialist to implement a technical task for setting up a two-way integration of the WhatsApp messenger with the Odoo CRM system. ⚠️ Important technical clarification: The official WhatsApp Business API (WABA) is not considered. It is necessary to… Python, Web Programming ∙ 2 days 4 hours back ∙ 23 proposals |
Data parsing through mobile APILooking for a person with experience in data parsing through mobile API, for parsing e-commerce, rozetka and similar sites. Tasks: 1. Intercepting traffic from the mobile application (Android), setting up a proxy, analyzing requests. 2. Identifying the necessary API endpoints… Python, Data Parsing ∙ 4 days 1 hour back ∙ 31 proposals |