├── LICENSE └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Mahbuba Mim 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Competitive Programming (CP): Tips for Improvement in Bangla 2 | 3 | সবাইকেই কম্পিটিটিভ প্রোগ্রামিংয়ে প্রবলেম ফেইস করতে হয়, এমন কেউ নেই যে এই প্রবলেমটা ফেইস করে না। 4 | 5 | 1. একটা প্রশ্ন সবার-ই থাকে যে কিভাবে Cp তে ভালো করবো ? 6 | -> Practice! Practice! Practice! 7 | কম্পিটিটিভ প্রোগ্রামিংয়ে ভালো করার সর্বোত্তম উপায় নিয়মিত অনুশীলন করা। প্রতিদিন অন্তত ২-৩ টা সমস্যা সমাধান করার চেষ্টা করা উচিত। Current Ratings যদি "x" হয়, তাহলে {x+100 to x+300} Ratings এর প্রবলেমগুলো সলভ করা উচিত। রেগুলার কনটেস্ট গুলোতে অংশ নেয়া উচিত কিন্তু যদি রেটিংস বাজে আসে অথবা নেগেটিভ হয়ে যায় তাহলেও Continue করতে হবে এবং যে প্রবলেমগুলো একটুর জন্য সলভ হয় নি, সেগুলো আবারো Try করতে হবে। সলভ করতে গিয়ে ঘন্টার পর ঘন্টা অথবা দিনের পর দিন আটকে থাকলেও হতাশ হওয়ার কিছু নেই, এটা সবার ক্ষেত্রেই হয়। (আমি নিজেও একবার একটা Hard Problem ১ মাস সময় নিয়ে সলভ করেছিলাম) 8 | 9 | 2. এমন অনেকেই আছে যারা প্রবলেমটাই বুঝতে পারে না, এখন প্রবলেম বুঝতে না পারলে কি করতে হবে ? 10 | -> প্রবলেমগুলো যেহেতু ইংলিশে থাকে তাই না বুঝতে পারার এটাও একটা কারণ হতে পারে। এজন্য প্রথম প্রথম প্রতিদিনই কিছু প্রবলেম পড়ার অভ্যাস করলে বেটার। পেইন খেলেও একটু ধৈর্য্য নিয়ে এই কাজগুলো করতে হবে। 11 | 12 | 3. এবার আর একটি প্রশ্ন প্রায় অনেকেরই থাকে যে কোন প্রোগ্রামিং ল্যাংগুয়েজ দিয়ে কম্পিটিটিভ প্রোগ্রামিং করা উচিত ? 13 | -> অবশ্যই C++ কারণ এটা গতি এবং দক্ষতার জন্য বেস্ট। প্রতিযোগিতামূলক প্রোগ্রামিংয়ে সময় এবং মেমোরির সীমাবদ্ধতা ভীষণ গুরুত্বপূর্ণ সেখানে C++ ব্যবহার বুদ্ধিমানের কাজ। বিশেষকরে C++ এর STL প্রোগ্রামারদের দ্রুত এবং আরও দক্ষতার সাথে কোড লিখতে সাহায্য করে। 14 | অনেকেই "Python" Prefer করে, আমি নিজেও করি কিন্তু পাইথনের ধীরগতি অনেক সময়ই কন্টেস্টের জন্য বেশ অসুবিধাজনক হয়ে দাঁড়ায়। 15 | 16 | 4. এবার আসি কোথায় Practice অথবা Contest করবো ? Beecrowd, HackerRank, Codeforces, Codechef, AtCoder, LeetCode: Beginner to Advance, কে কোন Online Judge ব্যবহার করে প্রবলেম সলভ এবং Cp করবেন ? 17 | -> বিগিনার টু এডভান্সড, সিরিয়ালি বলা হলোঃ 18 | 19 | 4.1. Beecrowd (Former name URI): যারা একেবারেই প্রবলেম সলভিং পারেন না অথবা প্রবলেমটাই বুঝতে পারেন না, প্রবলেম বুঝতে পেইন লাগে তাহলে তাদের জন্য Beecrowd. 20 | 21 | 4.2. HackerRank: Practice এর জন্য HackerRank বেস্ট বেস্ট বেস্ট! যারা মোটামুটি একটু ভালো প্রবলেম সলভিং পারেন অথবা প্রবলেম বুঝতে অসুবিধা হয় না তাহলে এটা তাদের জন্য। 22 | 23 | 4.3. Codeforces, Codechef, AtCoder: কনটেস্ট এর জন্য এই তিনটি ওয়েবসাইট বেস্ট। প্রবলেম সলভিং Practice করে তারপর Cp শুরু করে দেয়া উচিত এবং কনটেস্টে রেটিংস যতোই বাজে আসুক, তবুও কনটেস্টগুলো Continue করা উচিত। 24 | 25 | 4.4. LeetCode: Practice, Contest, Interview Prep -> সব একসাথে করতে পারবেন, All in One. 26 | 27 | 5. কম্পিটিটিভ প্রোগ্রামিং কেন গুরুত্বপূর্ণ ? 28 | -> এটা সমস্যা সমাধানের দক্ষতা, যৌক্তিক যুক্তি এবং বাক্সের বাইরে চিন্তাভাবনা বৃদ্ধি করতে সহায়তা করে। জবের ক্ষেত্রেও কোডিং ইন্টারভিউয়ের জন্য বেশ বড় একটা অবদান রাখে। সাথে আত্মবিশ্বাস বাড়ায় কারণ চ্যালেঞ্জিং সমস্যাগুলো সফলভাবে সমাধানের মাধ্যমে আত্মবিশ্বাস অনেকটাই গ্রো করে। 29 | 30 | 6. যারা Debugging করতেও হিমশিম খায়, তাদের কি করা উচিত ? 31 | -> Practice! Practice! Practice! 32 | বেশি প্র্যাকটিস না করার ফলে অনেক অভিজ্ঞ প্রোগ্রামাররা ও ডিবাগিংয়ে দুর্বল থাকে, That's why Practice More! 33 | 34 | Simple Tips: আমি কোডের মধ্যে ভুল সিলেক্ট করার সময় কোড উপর থেকে নিচে, এভাবে না পড়ে উল্টোভাবে পড়ে Debugging করি। (সবার ক্ষেত্রে প্রযোজ্য নাও হতে পারে) 35 | 36 | 37 | # DSA for Competitive Programming (CP): 38 | 39 | 1. DSA Foundations: Time & Space Complexity Analysis, Recursion, Divide & Conquer. 40 | (Essential for understanding the efficiency & structure of algorithms) 41 | 42 | 2. Basic DSA: Arrays, Stack, Queue, Binary Search, Sorting, Hashing, Two pointers, Backtracking. 43 | 44 | 3. Intermediate DSA: String Manipulation, Bit Manipulation, Greedy, Set, Map (Hash Map, Tree Map), Heap (Priority Queue), Graph (DFS, BFS, Shortest Paths), Disjoint Set (Union-Find). 45 | (Crucial for solving more complex problems & optimizing solutions) 46 | 47 | 4. Advanced DSA: DP, Game Theory, Tries, Segment Trees, Fenwick Trees (Binary Indexed Trees), Suffix Tree, Suffix Array, Heavy-Light Decomposition, Graph Coloring, Network Flow (Max Flow/Min Cut), Sqrt Decomposition. 48 | 49 | # Become good at solving math problems in CP (Math for CP) 50 | 51 | 1. Fundamentals: 52 | - Binary Exponentiation 53 | - Euclidean Algorithm (GCD, LCM) 54 | 55 | 2. Prime Numbers: 56 | - Sieve of Eratosthenes 57 | - Prime Factorization 58 | - Miller-Rabin Primality Test 59 | 60 | 3. Number Theory: 61 | - Euler's Totient Function 62 | - Fermat's Little Theorem 63 | - Wilson's Theorem 64 | - Modular Inverse (using Fermat’s Little Theorem & Extended Euclidean Algorithm) 65 | - Number of Divisors / Sum of Divisors 66 | - Mobius Function 67 | 68 | 4. Modular Arithmetic: 69 | - Chinese Remainder Theorem 70 | - Exponentiation by Squaring 71 | 72 | 5. Linear Algebra: 73 | - Matrix Multiplication and Inversion 74 | - Vectors, Eigenvalues, and Eigenvectors 75 | 76 | 6. Geometry: 77 | - Basics: Points, Lines, Circles, Distance, Angles 78 | - Computational Geometry: Convex Hull, Line Intersection 79 | - Coordinate Geometry: Point-Line Relationship, Polygon Area, Point in Polygon 80 | - Misc. Geometry: Orientation, Circle Intersection 81 | 82 | 7. Combinatorics: 83 | - Permutations, Combinations 84 | - Binomial Theorem & Coefficients 85 | - Pigeonhole Principle (used in distribution and arrangement problems) 86 | - Stars & Bars 87 | - Inclusion-Exclusion Principle 88 | - Lucas' Theorem (rare but useful) 89 | 90 | 8. Probability: 91 | - Basics 92 | - Expected Values (1D & 2D) 93 | 94 | 9. Misc/Miscellaneous: 95 | - Fast Fourier Transform (FFT) 96 | - Polynomial Multiplication 97 | - Random Number Generation 98 | - Line Sweep 99 | 100 | # Understanding the error codes: 101 | 1. Compilation Error (CE): Your program didn't get compiled successfully. 102 | Common reasons like Syntax Error, Missing Imports, Using restricted functionalities. 103 | 104 | 2. Wrong Answer (WA): Your program ran successfully but returned a different output. 105 | Common reasons like Incorrect interpretation of problem, Incorrect solution, Bug in the code, Edge cases(multiple test cases). 106 | 107 | 3. Time Limit Exceeded (TLE): Your program didn't complete execution in the alloted time. Your program gets a predefined time limit for every test case. 108 | Common reasons like Solution isn't optimal, Infinite Loop. 109 | 110 | 4. Memory Limit Exceeded (MLE): Your program tried to allocate more memory. 111 | Common reasons like Declaring large arrays/lists, Adding a lot of data, Stack Overflow Error. 112 | 113 | 5.1. Runtime Error (SIGSEGV/Segmentation Fault): Your program tried to access or write to a memory that, it can't access or is invalid. 114 | Common reasons like Accessing array/string index outside its range, Using too much memory in some languages, Uninitialized/Incorrectly initialized pointers. 115 | 116 | 5.2. Runtime Error (SIGFPE): Your program encountered a floating-point error. Generally caused if you do an invalid math operation. 117 | Common reasons like Division by zero, Square Root/Log of negative numbers. 118 | 119 | 5.3. Runtime Error (SIGABRT): Your program aborted the program due to fatal error. 120 | Common reason like Using assert/abort in the code. 121 | 122 | 5.4. Runtime Error (NZEC/Non-Zero Error Code): Your program didn't return a zero-error code from the main method & didn't fall into any of the above buckets. 123 | Common reasons like Not returning 0 from main method, Not catching exceptions. 124 | 125 | 6. Presentation Error (PE): Your program ran successfully & and the output's correct but the output format's incorrect. Normally due to "a missing space, newline, an extra space or newline." 126 | 127 | # Time Complexity: 128 | 129 | In problem-solving, TLE (Time Limit Exceeded) means the program took too long to run within the allotted time. To understand when and where to use different types of algorithms, you need to understand the algorithm's time complexity. Time complexity is primarily about calculating how much time an algorithm takes to run, which helps compare multiple solutions to a problem. 130 | 131 | Here are some common Time Complexities: 132 | 133 | 1. O(1): Constant Time Complexity 134 | 135 | The algorithm's runtime doesn't depend on the input size n, it always performs a constant number of operations. 136 | 137 | 2. O(log n): Logarithmic Time Complexity 138 | 139 | The runtime grows logarithmically relative to the input size n, typical of algorithms that divide the problem size in half at each step. (like Binary Search) 140 | 141 | 3. O(n): Linear Time Complexity 142 | 143 | The runtime increases linearly with the input size n, this's common in algorithms that iterate through each element of an array or list. 144 | 145 | 4. O(n log n): Linearithmic Time Complexity 146 | 147 | The runtime grows in proportion to n multiplied by the logarithm of n, this's often seen in efficient sorting algorithms. (like Merge & Quick Sort) 148 | 149 | 5. O(n^2): Quadratic Time Complexity 150 | 151 | The runtime is proportional to the square of the input size n, typical of algorithms with nested iterations over the input. (like Bubble, Selection & Insertion Sort) 152 | 153 | 6. O(n^3): Cubic Time Complexity 154 | 155 | The runtime grows with the cube of the input size n, occurring when there're three nested loops iterating over the input. 156 | 157 | 7. O(2^n): Exponential Time Complexity 158 | 159 | The runtime grows exponentially with the input size n, this's common in algorithms that solve problems by exploring all subsets or combinations. (like Brute-force) 160 | 161 | 8. O(n!): Factorial Time Complexity 162 | 163 | The runtime grows factorial with the input size n, typically seen in algorithms that generate permutations or combinations of a set. 164 | 165 | 9. O(sqrt(n)): Square Root Time Complexity 166 | 167 | This complexity occurs in algorithms where operations are performed up to the square root of the input size n, it's less common but can appear in certain mathematical algorithms or optimizations. 168 | 169 | 170 | How to calculate algorithms time complexity: 171 | 172 | 1. Identify the basic operations performed by the algorithm. 173 | 174 | 2. Count the number of times each operation is executed in terms of the input size n. 175 | 176 | 3. Express this count as a mathematical function of n. 177 | 178 | 4. Simplify the function to focus on the term with the largest growth rate. 179 | 180 | 5. Use "Big O Notation" to describe the asymptotic upper bound of the algorithm's time complexity. 181 | 182 | # Newbie to Candidate Master (CM): Ratings [0-1900] 183 | Topics: 184 | 1. Brute Force, Searching. 185 | 2. Sorting (Language Library Function) 186 | 3. Strings 187 | 4. Number Theory like Floor, Ceil, Modulo, Divisors, Factorization. 188 | 5. Time Complexity 189 | 6. STL (Language Library) 190 | 7. Binary Search 191 | 8. Two Pointers 192 | 9. Binary + Bitwise Stuff 193 | 10. DP 194 | 11. Combinatorics 195 | 12. Prefix Sums (Basic Range Queries) 196 | 13. Modular Arithmetic, GCD/LCM, Prime Factor Rep. 197 | 14. Recursion 198 | 15. Graphs, Trees 199 | 16. DSU/UFDS 200 | 17. Segment Trees 201 | 18. String Algorithms (Hashing) 202 | 19. Proofs 203 | 20. Constructive Algorithms 204 | 21. Combinatorial Techniques, Probability, Expected Value. 205 | 22. Game Theory 206 | 23. Advanced Graph Techniques like Shortest paths, MST. 207 | 208 | # ডায়নামিক প্রোগ্রামিং: Bitmask DP 209 | 210 | Suppose একটা প্রবলেমে ৫টা আইটেম দেয়া আছে, প্রত্যেকটার একটা Weight & Value আছে। কিছু আইটেম নেয়া যায় আবার কিছু বাদ দেয়া যায়। টার্গেট Total Weight ১০ এর নিচে রেখে Max Value বের করা। এটা অনেকটা ক্লাসিক Knapsack এর মতো শোনালেও, এখানে Twist হচ্ছে: কোন কোন আইটেম অলরেডি নেয়া হয়েছে সেটা Track করতে হবে। ক্লাসিক Knapsack এর O(N × W) এর তুলনায় এটা বেশি Complex কিন্তু Bitmask DP ছোট N এর জন্য বেশি Flexible. 211 | 212 | এখন এটা সলভ করতে গিয়ে প্রতিটা আইটেমের জন্য লুপ চালিয়ে একটা অ্যারে দিয়ে Track করা হলে কোডের টাইম কমপ্লেক্সিটি বেড়ে যাবে এবং Complex হয়ে যাবে। আর যদি আইটেমের সংখ্যা ২০ এর বেশি হয় তাহলে TLE খাওয়ার চান্স আছে, আর এখানেই Bitmask DP comes to the rescue! 213 | 214 | ★ Bitmask DP কীভাবে কাজ করে? 215 | 216 | একটা Integer এর বিট ব্যবহার করে পুরো স্টেট রিপ্রেজেন্ট করা যায়। Suppose ৫টা আইটেম আছে, তাহলে একটা ৫ বিটের সংখ্যা দিয়ে ট্র্যাক করা যাবে যে কোনটা নেয়া হয়েছে আর কোনটা নেয়া হয়নি। Example: 217 | 1. 00000 মানে কিছুই নেয়া হয়নি। 218 | 2. 10100 মানে ২ নং & ৪ নং আইটেম নেয়া হয়েছে। 219 | 3. 11111 মানে সবগুলো নেয়া হয়েছে। 220 | 221 | এখন DP স্টেট হবে: dp[mask][weight] (2D অ্যারে ব্যবহার করলে), যেখানে mask হচ্ছে বর্তমানে কোন আইটেমগুলো নেয়া হয়েছে। Recursion দিয়ে এটা সলভ করা যাবে। 222 | 223 | Suppose আইটেমগুলো: 224 | 1. Item 0: Weight 2, Value 3 225 | 2. Item 1: Weight 3, Value 4 226 | 3. Item 2: Weight 4, Value 5 227 | 4. Item 3: Weight 1, Value 2 228 | 5. Item 4: Weight 5, Value 6 229 | 230 | Here, Total Weight লিমিট ১০. 231 | 232 | এখানে dp[mask] দিয়ে Max Value স্টোর করা হবে। Bitmask DP তে সাধারণত dp[mask] (1D অ্যারে) ব্যবহার করা হয়, যদি weight ট্র্যাক করতে হয় তাহলে dp[mask][weight] ব্যবহার করতে হবে। 233 | 234 | 1. mask = 00001 (Item 0): Weight 2, Value 3 235 | 2. mask = 00010 (Item 1): Weight 3, Value 4 236 | 3. mask = 00100 (Item 2): Weight 4, Value 5 237 | 4. mask = 01000 (Item 3): Weight 1, Value 2 238 | 5. mask = 10000 (Item 4): Weight 5, Value 6 239 | 6. mask = 00011 (Item 0 + Item 1): Weight (2+3)=5, Value (3+4)=7 240 | 7. mask = 00101 (Item 0 + Item 2): Weight (2+4)=6, Value (3+5)=8 241 | 8. mask = 01001 (Item 0 + Item 3): Weight (2+1)=3, Value (3+2)=5 242 | 9. mask = 11001 (Item 0 + Item 1 + Item 4): Weight (2+3+5)=10, Value (3+4+6)=13 243 | 10. mask = 01100 (Item 2 + Item 3): Weight (4+1)=5, Value (5+2)=7 244 | 245 | Here, Max Value 13 (যখন Item 0, 1 & 4 নেয়া হয়) 246 | 247 | কোডে এটা রিকার্সিভলি চেক করতে হবে প্রতিটা বিটের জন্য - কোনটা নেয়া হবে & কোনটা নেয়া হবে না। এটা করার জন্য Bitwise Operation ব্যবহার হয়। যেমন: কোনো আইটেম i নেয়া হয়েছে কিনা চেক করতে "mask & (1 << i)", যদি ০ হয় তাহলে ঐ আইটেম এখনো নেয়া হয়নি। নতুন আইটেম i যোগ করতে "mask | (1 << i)", এটা mask এ i তম বিটকে ১ করে দেয়। 248 | 249 | ★ Complexity Analysis 250 | 251 | Bitmask DP তে N টি আইটেম থাকলে 2^N সংখ্যক subset (mask) সম্ভব। 252 | 253 | Total States: 2^N 254 | Each State Process Time: O(N) 255 | Total Complexity: O(N × 2^N) 256 | 257 | যেহেতু, 2^20 approx 10^6 তাই N = 20 পর্যন্ত এটা Efficiently চলবে কিন্তু N > 25 হলে TLE খাওয়ার সম্ভাবনা বেশি! 258 | 259 | # Programming Contests: 260 | NHSPC, BdOI, IOI, APIO, IUPC, NCPC, ACM ICPC, Meta Hacker Cup, ACM ICFP, NGPC. 261 | 262 | 1. NHSPC: For high school and college students, Polytechnic first & second year. 263 | 2. BdOI, APIO, IOI: For school and college students. 264 | Language (IOI)-> 265 | • For the past sessions (till 2015): C, C++, Pascal. 266 | • But (Since 2017): C++, Java, Pascal. 267 | 3. NCPC, IUPC, ICPC Dhaka Regional > ICPC Asia West > ICPC World Final - You can't participate in the same year: in more than 2 teams and "at more than 2 regionals.(for Asia)" 268 | 4. Meta Hacker Cup: Open to everyone, consists of three rounds: Qualification, Elimination, and Final. 269 | 5. ACM ICFP: Virtual coding contest, any programming language can be used. 270 | 6. NGPC: For female students in high school, college, and university. Rules similar to ICPC. 271 | 272 | Note: 273 | Google Code Jam, Hash Code, Kick Start, and TCO (Topcoder Open) contests are no longer held. 274 | 275 | # Extra: প্রোগ্রামিং এর কিছু Interesting জিনিস 276 | 277 | 1. Turing Completeness: যেখানে একটি প্রোগ্রামিং ল্যাংগুয়েজ দিয়ে সব কিছু Automate করা যায়। মানে একটি ল্যাংগুয়েজ দিয়ে সব ধরনের সমস্যা সমাধান করা যায় (solve any complex computation problem if provided with enough memory & time) 278 | 279 | 2. Quine: Quine নিজের কোডকে আউটপুট হিসেবে Print করে এবং এই ধরনের কোড লেখা Challenging (takes no input & produces a copy of its own source code as its only output) 280 | 281 | 3. Algo-Trading: স্টক মার্কেটের জন্য অ্যালগরিদম লিখে অটোমেটেড Trade করা হয়। এখানে কোড Real-Time Data নিয়ে জটিল সিদ্ধান্ত নিতে পারে, যা মানুষের চেয়ে অনেক Fast. (possible to make money with algo-trading) 282 | 283 | 4. Sorting Algorithms Art: কিছু Sorting অ্যালগরিদম Like QuickSort, MergeSort কে একটি আর্টওয়ার্ক হিসেবে Visualize করা যেতে পারে। ভিজ্যুয়ালাইজেশনে অ্যালগরিদমের আচরণ কিভাবে Data Sort করে সেটা দেখা যাবে, Interesting না ব্যাপারটা ?? 284 | 285 | 5. Recursive Art: রিকার্সিভ ফাংশন ব্যবহার করেও Visual Art তৈরি করা যায়। Notable Example: Fractal Geometry(ফ্র্যাক্টাল জ্যামিতি); যেখানে লুপের মাধ্যমে একটি প্যাটার্ন বাড়াতে বাড়াতে জটিল স্ট্রাকচার তৈরি করা যায়। 286 | ○ Base case: Simplest form of the problem that has a direct answer. 287 | ○ Recursive case: The step where you break the problem into a smaller, self-similar task. 288 | 289 | 6. Polyglot Programming: যেখানে একটি কোড একাধিক প্রোগ্রামিং ল্যাংগুয়েজে Run করতে পারে। (the same code can work properly in different languages) 290 | 291 | Example: একটি কোড এমনভাবে লেখা হতে পারে যা Python, JS, Ruby বা অন্যান্য ভাষায় একইভাবে Run হতে পারে। Interesting না ব্যাপারটা?? 292 | ★ But: Polyglot কোড create করা খুব কঠিন কারণ প্রতিটি ভাষার Syntax & Structure Maintain করতে হয়; যা সব ভাষায় একইভাবে Match হয় না। তাই একাধিক ভাষায় কোডটি Run করানোর জন্য Carefully কোড লিখতে হয়। 293 | 294 | 7. Easter Eggs in Code: অনেক সফটওয়্যার বা কোডে ডেভেলপাররা ইচ্ছা করে কিছু Secret/Funny ফিচার, মেসেজ রেখে দেয়। এগুলো আসলে Surprise Plan!! 295 | 296 | Examples: 297 | 298 | 7.1. Google এর "Do a Barrel Roll": গুগলে এটা লিখে সার্চ দিলে, সার্চ পেজটি 360 ডিগ্রি ঘুরে যায়। 299 | 300 | 7.2. Chrome Dino Game: ইন্টারনেট কানেকশন না থাকলে একটি ডাইনোসর Game দেখা যায় যা Key Press করলে শুরু হয়। 301 | 302 | 7.3. Excel 95 এর "Flight Simulator": এক্সেলের Old ভার্সনে Hidden Flight Simulator ছিল। 303 | 304 | (these're mainly added as fun elements to entertain users, spark curiosity & encourage them to explore the software further) 305 | 306 | 8. Genetic Algorithms: এই অ্যালগরিদম "Evolution(প্রকৃতির বিবর্তন)" ধারণা থেকে অনুপ্রাণিত, যা "Survival of the Fittest" ধারণা ব্যবহার করে। যেখানে সমস্যা সমাধানের জন্য বিভিন্ন সম্ভাব্য-সমাধান তৈরি করা হয় এবং বেস্ট টা সিলেক্ট করা হয়। আর এভাবেই এই অ্যালগরিদম পর্যায়ক্রমে Better Solution খুঁজে বের করতে থাকে। 307 | 308 | 9. Code Golf: কোডিং দক্ষতা এবং সৃজনশীলতার পরীক্ষা (প্রোগ্রামিং চ্যালেঞ্জ); যেখানে একটি নির্দিষ্ট কাজ করতে, সবচেয়ে কম কোড ব্যবহার করে কাজটি করার কৌশল খুঁজে বের করতে হয়। 309 | ★ কোডের দৈর্ঘ্য যত কম হবে, তত বেশি স্কোর পাওয়া যায়। 310 | 311 | 10. Esoteric Programming Languages: যা মজার উদ্দেশ্যে তৈরি করা হয়, কাজের জন্য নয়। এসব ভাষার কোড সাধারণত জটিল, অস্বাভাবিক এবং অদ্ভুতভাবে ডিজাইন করা হয়। এগুলো চ্যালেঞ্জ গ্রহণকারী ব্যক্তিদের জন্য তৈরি করা হয়। 312 | 313 | Examples: 314 | 315 | 10.1. LOLCODE: কোড লেখার স্টাইল "meme" এর মতো; যেখানে কোড হাস্যকরভাবে লেখা হয়। 316 | 317 | 10.2. Shakespeare: এই ভাষায় এমনভাবে কোড লেখা হয়; যেখানে প্রোগ্রামটি একটি নাটকের স্ক্রিপ্টের মতো দেখায়। কোডের সিনট্যাক্স এমনভাবে ডিজাইন করা হয় যে তা দেখতে অনেকটা শেক্সপিয়ারের নাটকের মতো মনে হয়। 318 | 319 | 10.3. Piet: প্রোগ্রামিং ভাষা; যা ছবির মতো কোড লেখে, যেখানে প্রোগ্রামটি দৃশ্যমানভাবে একধরনের ছবির আকারে থাকে। 320 | 321 | 11. Concurrency & Parallelism: প্রোগ্রামিংয়ে কনকারেন্সি এবং প্যারালেলিজম ব্যবহার করলে একসাথে অনেক কাজ করা যায়, যা সিস্টেমের কার্যক্ষমতা অনেক বাড়িয়ে দেয়। 322 | ★ Concurrency's about "dealing with" lots of things at once. 323 | Parallelism's about "doing" lots of things at once. 324 | 325 | 326 | 327 | 328 | --------------------------------------------------------------------------------