mirror of
https://github.com/jwasham/coding-interview-university.git
synced 2025-07-14 03:18:48 +08:00
add algorithmic section
This commit is contained in:
@ -597,45 +597,40 @@ iOS-এ এটির দাম $25 কিন্তু অন্যান্য
|
||||
আপনি যখন "Cracking the Coding Interview" এর মধ্য দিয়ে যান, তখন এই বিষয়ে একটি অধ্যায় থাকে এবং শেষে একটি কুইজ দেখতে হয়
|
||||
যদি আপনি বিভিন্ন অ্যালগরিদমের রানটাইম জটিলতা সনাক্ত করতে পারেন। এটি একটি সুপার পর্যালোচনা এবং পরীক্ষা.
|
||||
|
||||
</details>
|
||||
## ডাটা স্ট্রাকচার
|
||||
|
||||
##ডাটা স্ট্রাকচার
|
||||
|
||||
<details>
|
||||
<সংশ্লেটি> ডেটা স্ট্রাকচার </summary>
|
||||
|
||||
-###অ্যারে
|
||||
-একটি স্বয়ংক্রিয় আকার পরিবর্তনকারী ভেক্টর প্রয়োগ করুন।
|
||||
- বিবরণ:
|
||||
-[অ্যারে (ভিডিও)] (https://www.coursera.org/learn/data-structures/ নির্বাচন //sBSF/arrays)
|
||||
-[ইউসি বার্কলে সিএস 61 বি-লিনিয়ার এবং মাল্টি-ডিম অ্যারে (ভিডিও)] (https://archive.org/details/ucberkeley_webcast_Wp8oiO_CZZE) (15m 32s থেকে দেখা শুরু করুন)
|
||||
-[ডাইনামিক অ্যারে (ভিডিও)] (https://www.coursera.org/learn/data-structures/lecture/EwbnV/dynamic-arrays)
|
||||
-[জেগড অ্যারে (ভিডিও)] (https://www.youtube.com/watch?v=1jtrQqYpt7g)
|
||||
- একটি ভেক্টর প্রয়োগ করুন (স্বয়ংক্রিয় আকার পুনরায় আকারের সাথে পরিবর্তনীয় অ্যারে):
|
||||
- অ্যারে এবং পয়েন্টার ব্যবহার করে কোডিং অনুশীলন করুন, এবং সূচক ব্যবহারের পরিবর্তে সূচীতে ঝাঁপ দেওয়ার জন্য পয়েন্টার ম্যাথ th
|
||||
- বরাদ্দ মেমরি সহ নতুন কাঁচা ডেটা অ্যারে
|
||||
-হুডের অধীনে ইন অ্যারে বরাদ্দ করতে পারে, কেবল তার বৈশিষ্ট্যগুলি ব্যবহার করবেন না
|
||||
-16 দিয়ে শুরু করুন, বা যদি শুরুর সংখ্যাটি বেশি হয় তবে 2-16, 32, 64, 128 এর শক্তি ব্যবহার করুন
|
||||
- আকার ()-আইটেমের সংখ্যা
|
||||
- ক্ষমতা ()-এটি ধরে রাখতে পারে এমন আইটেমের সংখ্যা
|
||||
-[ ] খালি()
|
||||
- এ (সূচক)-প্রদত্ত সূচকে আইটেমটি ফেরত দেয়, সূচক সীমা ছাড়িয়ে গেলে ফুটিয়ে উঠে
|
||||
- ধাক্কা (আইটেম)
|
||||
- সন্নিবেশ (সূচক, আইটেম)-সূচীতে আইটেম সন্নিবেশ করায়, সূচকের মান এবং পিছনের উপাদানগুলি ডানদিকে সরিয়ে দেয়
|
||||
- প্রিপেন্ড (আইটেম)-উপরে সূচক 0 এ সন্নিবেশ ব্যবহার করতে পারেন
|
||||
- পপ ()-শেষ থেকে সরান, ফেরতের মান
|
||||
- মুছুন (সূচী)-সূচি অনুসারে আইটেম মুছুন, সমস্ত অনুবর্তনীয় উপাদান বাম দিকে সরিয়ে
|
||||
- সরান (আইটেম)-মান সন্ধান করে এবং এটি ধরে রাখা সূচকটি সরিয়ে দেয় (এমনকি একাধিক জায়গায় থাকলেও)
|
||||
- সন্ধান করুন (আইটেম)-মানটির সন্ধান করে এবং সেই মানটির সাথে প্রথম সূচকটি প্রদান করে,-১ পাওয়া না গেলে
|
||||
- পুনরায় আকার দিন (নতুন_ক্ষমতা) // ব্যক্তিগত ফাংশন
|
||||
-যখন আপনি সক্ষমতা পৌঁছেছেন, আকার দ্বিগুণ করার জন্য পুনরায় আকার দিন
|
||||
-কোনও আইটেমটি পপ করার সময়, আকারটি যদি 1/4 ধারণক্ষমতা হয় তবে আকারটি অর্ধেক করুন
|
||||
- সময়
|
||||
-ও (1) শেষে অন্তর্ভুক্ত / অপসারণ (আরও স্থানের জন্য বরাদ্দের জন্য সূক্ষ্ম), সূচক বা আপডেট
|
||||
-ও (এন) অন্যত্র সন্নিবেশ / অপসারণ করতে
|
||||
- স্পেস
|
||||
-স্মৃতিতে সামঞ্জস্যপূর্ণ তাই নৈকট্য পারফরম্যান্সে সহায়তা করে
|
||||
-স্থান প্রয়োজন = (অ্যারে ক্ষমতা, যা> = এন) * আইটেমের আকার, তবে 2n হলেও এখনও হে (এন)
|
||||
- ### অ্যারে
|
||||
- [ ] অ্যারে সম্পর্কে:
|
||||
- [Arrays CS50 Harvard University](https://www.youtube.com/watch?v=tI_tIZFyKBw&t=3009s)
|
||||
- [Arrays (video)](https://www.coursera.org/lecture/data-structures/arrays-OsBSF)
|
||||
- [UC Berkeley CS61B - Linear and Multi-Dim Arrays (video)](https://archive.org/details/ucberkeley_webcast_Wp8oiO_CZZE) (Start watching from 15m 32s)
|
||||
- [Dynamic Arrays (video)](https://www.coursera.org/lecture/data-structures/dynamic-arrays-EwbnV)
|
||||
- [Jagged Arrays (video)](https://www.youtube.com/watch?v=1jtrQqYpt7g)
|
||||
- [ ] Implement a vector (mutable array with automatic resizing):
|
||||
- [ ] Practice coding using arrays and pointers, and pointer math to jump to an index instead of using indexing.
|
||||
- [ ] New raw data array with allocated memory
|
||||
- can allocate int array under the hood, just not use its features
|
||||
- start with 16, or if starting number is greater, use power of 2 - 16, 32, 64, 128
|
||||
- [ ] size() - আইটেমের সংখ্যা
|
||||
- [ ] capacity() - আইটেমের সংখ্যা এটি ধরে রাখতে পারে
|
||||
- [ ] is_empty()
|
||||
- [ ] at(index) - returns item at given index, blows up if index out of bounds
|
||||
- [ ] push(item)
|
||||
- [ ] insert(index, item) - inserts item at index, shifts that index's value and trailing elements to the right
|
||||
- [ ] prepend(item) - can use insert above at index 0
|
||||
- [ ] pop() - শেষ থেকে সরান, ভ্যালু রিটার্ন করুন
|
||||
- [ ] delete(index) - delete item at index, shifting all trailing elements left
|
||||
- [ ] remove(item) - looks for value and removes index holding it (even if in multiple places)
|
||||
- [ ] find(item) - looks for value and returns first index with that value, -1 if not found
|
||||
- [ ] resize(new_capacity) // private function
|
||||
- when you reach capacity, resize to double the size
|
||||
- when popping an item, if size is 1/4 of capacity, resize to half
|
||||
- [ ] Time
|
||||
- O(1) to add/remove at end (amortized for allocations for more space), index, or update
|
||||
- O(n) to insert/remove elsewhere
|
||||
- [ ] Space
|
||||
- contiguous in memory, so proximity helps performance
|
||||
- space needed = (array capacity, which is >= n) * size of item, but even if 2n, still O(n)
|
||||
|
||||
-###লিঙ্কযুক্ত তালিকাগুলি
|
||||
- বিবরণ:
|
||||
|
Reference in New Issue
Block a user