jugaadcode 0.1.2__tar.gz → 0.1.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. jugaadcode-0.1.7/PKG-INFO +396 -0
  2. jugaadcode-0.1.7/README.md +388 -0
  3. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/pyproject.toml +1 -1
  4. jugaadcode-0.1.7/src/jugaadcode.egg-info/PKG-INFO +396 -0
  5. jugaadcode-0.1.2/PKG-INFO +0 -16
  6. jugaadcode-0.1.2/README.md +0 -8
  7. jugaadcode-0.1.2/src/jugaadcode.egg-info/PKG-INFO +0 -16
  8. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/setup.cfg +0 -0
  9. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/__init__.py +0 -0
  10. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/anagram.py +0 -0
  11. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/armstrong.py +0 -0
  12. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/binary_search.py +0 -0
  13. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/bubble_sort.py +0 -0
  14. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/capitalize_words.py +0 -0
  15. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/character_frequency.py +0 -0
  16. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/climbing_stairs.py +0 -0
  17. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/coin_change.py +0 -0
  18. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/count_vowels.py +0 -0
  19. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/counting_sort.py +0 -0
  20. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/duplicate_number.py +0 -0
  21. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/even_odd.py +0 -0
  22. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/factorial.py +0 -0
  23. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/factorial_trailing_zeros_direct.py +0 -0
  24. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/factorial_with_trailing_zeros.py +0 -0
  25. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/fibonacci.py +0 -0
  26. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/find_max.py +0 -0
  27. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/find_min.py +0 -0
  28. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/first_non_repeating.py +0 -0
  29. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/gcd.py +0 -0
  30. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/harshad_number.py +0 -0
  31. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/input_utils.py +0 -0
  32. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/insertion_sort.py +0 -0
  33. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/kth_largest.py +0 -0
  34. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/lcm.py +0 -0
  35. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/linear_search.py +0 -0
  36. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/longest_consecutive.py +0 -0
  37. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/longest_word.py +0 -0
  38. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/matrix_transpose.py +0 -0
  39. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/maximum_subarray.py +0 -0
  40. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/merge_sort.py +0 -0
  41. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/move_zeros.py +0 -0
  42. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/pair_with_difference.py +0 -0
  43. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/palindrome.py +0 -0
  44. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/perfect_number.py +0 -0
  45. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/power.py +0 -0
  46. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/prime.py +0 -0
  47. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/quick_sort.py +0 -0
  48. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/remove_duplicates_array.py +0 -0
  49. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/remove_duplicates_string.py +0 -0
  50. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/reverse_linked_list.py +0 -0
  51. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/reverse_number.py +0 -0
  52. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/reverse_string.py +0 -0
  53. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/second_largest.py +0 -0
  54. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/selection_sort.py +0 -0
  55. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/strong_number.py +0 -0
  56. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/subsequence.py +0 -0
  57. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/sum_of_digits.py +0 -0
  58. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/trailing_zeros.py +0 -0
  59. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/two_sum.py +0 -0
  60. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/valid_parentheses.py +0 -0
  61. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode/word_count.py +0 -0
  62. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode.egg-info/SOURCES.txt +0 -0
  63. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode.egg-info/dependency_links.txt +0 -0
  64. {jugaadcode-0.1.2 → jugaadcode-0.1.7}/src/jugaadcode.egg-info/top_level.txt +0 -0
@@ -0,0 +1,396 @@
1
+ Metadata-Version: 2.4
2
+ Name: jugaadcode
3
+ Version: 0.1.7
4
+ Summary: A Python library for common programming logic and algorithms
5
+ Author: Mohamed Faraazman Bin Farooq S
6
+ Requires-Python: >=3.9
7
+ Description-Content-Type: text/markdown
8
+
9
+ # jugaadcode 🐍
10
+
11
+ **A beginner-friendly Python library for coding logic, algorithms, and interview preparation.**
12
+
13
+ `jugaadcode` is a Python library containing commonly used programming problems and algorithm implementations. It is designed for students, beginners, developers, and anyone preparing for coding interviews.
14
+
15
+ Solve common programming problems with simple Python function calls instead of rewriting the logic every time.
16
+
17
+ ## Features
18
+
19
+ - Common number-based programming problems
20
+ - String manipulation and character operations
21
+ - Array and list operations
22
+ - Searching and sorting algorithms
23
+ - Mathematical algorithms
24
+ - Dynamic programming problems
25
+ - Matrix operations
26
+ - Linked-list algorithms
27
+ - Interactive input support for functions that accept optional arguments
28
+ - Individual Python modules for individual algorithms
29
+ - Simple function-based API
30
+
31
+ ## Installation
32
+
33
+ Install the latest version from PyPI:
34
+
35
+ ```bash
36
+ python -m pip install jugaadcode
37
+ ```
38
+
39
+ Upgrade to the latest version:
40
+
41
+ ```bash
42
+ python -m pip install --upgrade jugaadcode
43
+ ```
44
+
45
+ ## Basic Usage
46
+
47
+ Import the library:
48
+
49
+ ```python
50
+ import jugaadcode
51
+ ```
52
+
53
+ Call a function by passing its required arguments:
54
+
55
+ ```python
56
+ print(jugaadcode.is_prime(17))
57
+ print(jugaadcode.factorial(5))
58
+ print(jugaadcode.is_armstrong(153))
59
+ ```
60
+
61
+ Example output:
62
+
63
+ ```text
64
+ True
65
+ 120
66
+ True
67
+ ```
68
+
69
+ You can also import individual functions:
70
+
71
+ ```python
72
+ from jugaadcode import is_prime, factorial, fibonacci
73
+
74
+ print(is_prime(17))
75
+ print(factorial(5))
76
+ print(fibonacci(7))
77
+ ```
78
+
79
+ ## Interactive Input
80
+
81
+ Functions that support optional arguments can prompt you for input when called without those arguments.
82
+
83
+ ```python
84
+ import jugaadcode
85
+
86
+ result = jugaadcode.factorial()
87
+ print(result)
88
+ ```
89
+
90
+ The function prompts you to enter a number.
91
+
92
+ You can also pass a number directly:
93
+
94
+ ```python
95
+ print(jugaadcode.factorial(5))
96
+ ```
97
+
98
+ **Note:** Interactive input is available only for functions implemented to support it. Check each function's arguments before calling it without parameters.
99
+
100
+ ---
101
+
102
+ # 1. Number Algorithms
103
+
104
+ These functions solve common mathematical and number-based programming problems.
105
+
106
+ | Function | Description | Example |
107
+ |---|---|---|
108
+ | `is_prime(n)` | Checks whether a number is prime | `jugaadcode.is_prime(17)` |
109
+ | `factorial(n)` | Calculates the factorial of a number | `jugaadcode.factorial(5)` |
110
+ | `fibonacci(n)` | Generates Fibonacci numbers | `jugaadcode.fibonacci(7)` |
111
+ | `is_palindrome(n)` | Checks whether a number is a palindrome | `jugaadcode.is_palindrome(121)` |
112
+ | `is_armstrong(n)` | Checks whether a number is an Armstrong number | `jugaadcode.is_armstrong(153)` |
113
+ | `reverse_number(n)` | Reverses the digits of a number | `jugaadcode.reverse_number(1234)` |
114
+ | `sum_of_digits(n)` | Calculates the sum of a number's digits | `jugaadcode.sum_of_digits(1234)` |
115
+ | `is_perfect_number(n)` | Checks whether a number is perfect | `jugaadcode.is_perfect_number(28)` |
116
+ | `is_strong_number(n)` | Checks whether a number is a strong number | `jugaadcode.is_strong_number(145)` |
117
+ | `is_harshad_number(n)` | Checks whether a number is divisible by its digit sum | `jugaadcode.is_harshad_number(18)` |
118
+ | `gcd(a, b)` | Finds the greatest common divisor | `jugaadcode.gcd(12, 18)` |
119
+ | `lcm(a, b)` | Finds the least common multiple | `jugaadcode.lcm(12, 18)` |
120
+ | `is_even(n)` | Checks whether a number is even | `jugaadcode.is_even(8)` |
121
+ | `power(base, exponent)` | Calculates a power | `jugaadcode.power(2, 3)` |
122
+ | `trailing_zeros(n)` | Counts trailing zeros in `n!` | `jugaadcode.trailing_zeros(100)` |
123
+ | `factorial_with_trailing_zeros(k)` | Finds a number whose factorial has a specified number of trailing zeros | `jugaadcode.factorial_with_trailing_zeros(3)` |
124
+ | `factorial_trailing_zeros_direct(n)` | Calculates the factorial and counts its trailing zeros | `jugaadcode.factorial_trailing_zeros_direct(10)` |
125
+
126
+ ### Examples
127
+
128
+ ```python
129
+ import jugaadcode
130
+
131
+ print(jugaadcode.is_prime(17)) # True
132
+ print(jugaadcode.factorial(5)) # 120
133
+ print(jugaadcode.is_palindrome(121)) # True
134
+ print(jugaadcode.is_armstrong(153)) # True
135
+ print(jugaadcode.reverse_number(1234)) # 4321
136
+ print(jugaadcode.sum_of_digits(1234)) # 10
137
+ print(jugaadcode.gcd(12, 18)) # 6
138
+ print(jugaadcode.lcm(12, 18)) # 36
139
+ print(jugaadcode.is_even(8)) # True
140
+ print(jugaadcode.power(2, 3)) # 8
141
+ print(jugaadcode.trailing_zeros(100)) # 24
142
+ ```
143
+
144
+ ---
145
+
146
+ # 2. String Algorithms
147
+
148
+ These functions perform common string-processing operations.
149
+
150
+ | Function | Description | Example |
151
+ |---|---|---|
152
+ | `reverse_string(text)` | Reverses a string | `jugaadcode.reverse_string("hello")` |
153
+ | `count_vowels(text)` | Counts vowels in a string | `jugaadcode.count_vowels("education")` |
154
+ | `character_frequency(text)` | Counts character occurrences | `jugaadcode.character_frequency("banana")` |
155
+ | `is_anagram(first, second)` | Checks whether two strings are anagrams | `jugaadcode.is_anagram("listen", "silent")` |
156
+ | `remove_duplicate_characters(text)` | Removes repeated characters | `jugaadcode.remove_duplicate_characters("banana")` |
157
+ | `first_non_repeating(text)` | Finds the first non-repeating character | `jugaadcode.first_non_repeating("swiss")` |
158
+ | `word_count(text)` | Counts words in a string | `jugaadcode.word_count("Python is easy")` |
159
+ | `capitalize_words(text)` | Capitalizes words in a string | `jugaadcode.capitalize_words("hello world")` |
160
+ | `longest_word(text)` | Finds the longest word in a sentence | `jugaadcode.longest_word("Python makes coding fun")` |
161
+ | `is_subsequence(first, second)` | Checks whether one string is a subsequence of another | `jugaadcode.is_subsequence("ace", "abcde")` |
162
+
163
+ ### Examples
164
+
165
+ ```python
166
+ import jugaadcode
167
+
168
+ print(jugaadcode.reverse_string("hello"))
169
+ print(jugaadcode.count_vowels("education"))
170
+ print(jugaadcode.is_anagram("listen", "silent"))
171
+ print(jugaadcode.remove_duplicate_characters("banana"))
172
+ print(jugaadcode.first_non_repeating("swiss"))
173
+ print(jugaadcode.word_count("Python is easy"))
174
+ print(jugaadcode.capitalize_words("hello world"))
175
+ print(jugaadcode.longest_word("Python makes coding fun"))
176
+ print(jugaadcode.is_subsequence("ace", "abcde"))
177
+ ```
178
+
179
+ Example results depend on each function's implementation and input-handling rules.
180
+
181
+ ---
182
+
183
+ # 3. Array and List Algorithms
184
+
185
+ These functions work with Python lists and sequences.
186
+
187
+ | Function | Description | Example |
188
+ |---|---|---|
189
+ | `find_max(numbers)` | Finds the largest value | `jugaadcode.find_max([3, 8, 2])` |
190
+ | `find_min(numbers)` | Finds the smallest value | `jugaadcode.find_min([3, 8, 2])` |
191
+ | `second_largest(numbers)` | Finds the second-largest value | `jugaadcode.second_largest([10, 5, 8, 3])` |
192
+ | `remove_duplicates(numbers)` | Removes duplicate elements | `jugaadcode.remove_duplicates([1, 2, 2, 3])` |
193
+ | `find_missing_number(numbers)` | Finds a missing number | `jugaadcode.find_missing_number([1, 2, 4, 5])` |
194
+ | `find_duplicate(numbers)` | Finds a duplicate number | `jugaadcode.find_duplicate([1, 2, 3, 2])` |
195
+ | `rotate_left(numbers, k)` | Rotates a list to the left | `jugaadcode.rotate_left([1, 2, 3, 4, 5], 2)` |
196
+ | `rotate_right(numbers, k)` | Rotates a list to the right | `jugaadcode.rotate_right([1, 2, 3, 4, 5], 2)` |
197
+ | `two_sum(numbers, target)` | Finds two elements that add up to a target | `jugaadcode.two_sum([2, 7, 11, 15], 9)` |
198
+ | `move_zeros(numbers)` | Moves zeros within a list | `jugaadcode.move_zeros([0, 1, 0, 3, 12])` |
199
+ | `kth_largest(numbers, k)` | Finds the kth-largest element | `jugaadcode.kth_largest([3, 2, 1, 5, 4], 2)` |
200
+ | `maximum_subarray(numbers)` | Finds the maximum-sum contiguous subarray result | `jugaadcode.maximum_subarray([-2, 1, -3, 4, -1, 2, 1])` |
201
+ | `longest_consecutive(numbers)` | Finds the longest consecutive sequence length or result | `jugaadcode.longest_consecutive([100, 4, 200, 1, 3, 2])` |
202
+ | `pair_with_difference(numbers, difference)` | Finds a pair with a specified difference | `jugaadcode.pair_with_difference([1, 5, 3, 4, 2], 2)` |
203
+
204
+ ### Examples
205
+
206
+ ```python
207
+ import jugaadcode
208
+
209
+ print(jugaadcode.find_max([3, 8, 2]))
210
+ print(jugaadcode.find_min([3, 8, 2]))
211
+ print(jugaadcode.second_largest([10, 5, 8, 3]))
212
+ print(jugaadcode.remove_duplicates([1, 2, 2, 3]))
213
+ print(jugaadcode.two_sum([2, 7, 11, 15], 9))
214
+ print(jugaadcode.move_zeros([0, 1, 0, 3, 12]))
215
+ print(jugaadcode.kth_largest([3, 2, 1, 5, 4], 2))
216
+ ```
217
+
218
+ **Important:** Input requirements vary. For example, binary search requires sorted input, and some array algorithms require non-empty lists or specific input formats.
219
+
220
+ ---
221
+
222
+ # 4. Searching Algorithms
223
+
224
+ | Function | Description | Example |
225
+ |---|---|---|
226
+ | `linear_search(numbers, target)` | Searches sequentially for a target | `jugaadcode.linear_search([10, 20, 30], 20)` |
227
+ | `binary_search(numbers, target)` | Searches a sorted list efficiently | `jugaadcode.binary_search([10, 20, 30, 40], 30)` |
228
+
229
+ ### Example
230
+
231
+ ```python
232
+ import jugaadcode
233
+
234
+ numbers = [10, 20, 30, 40, 50]
235
+
236
+ print(jugaadcode.linear_search(numbers, 30))
237
+ print(jugaadcode.binary_search(numbers, 30))
238
+ ```
239
+
240
+ **Note:** The list passed to `binary_search()` must be sorted in ascending order unless the implementation specifies otherwise.
241
+
242
+ ---
243
+
244
+ # 5. Sorting Algorithms
245
+
246
+ | Function | Description | Example |
247
+ |---|---|---|
248
+ | `bubble_sort(numbers)` | Sorts by repeatedly swapping adjacent elements | `jugaadcode.bubble_sort([5, 2, 4, 1])` |
249
+ | `selection_sort(numbers)` | Sorts by repeatedly selecting the next smallest element | `jugaadcode.selection_sort([5, 2, 4, 1])` |
250
+ | `insertion_sort(numbers)` | Sorts by inserting elements into their correct positions | `jugaadcode.insertion_sort([5, 2, 4, 1])` |
251
+ | `merge_sort(numbers)` | Sorts using divide and conquer | `jugaadcode.merge_sort([5, 2, 4, 1])` |
252
+ | `quick_sort(numbers)` | Sorts using partitioning and divide and conquer | `jugaadcode.quick_sort([5, 2, 4, 1])` |
253
+ | `counting_sort(numbers)` | Sorts integers using value frequencies | `jugaadcode.counting_sort([4, 2, 2, 1, 3])` |
254
+
255
+ ### Example
256
+
257
+ ```python
258
+ import jugaadcode
259
+
260
+ numbers = [5, 2, 4, 1, 3]
261
+
262
+ print(jugaadcode.bubble_sort(numbers))
263
+ print(jugaadcode.selection_sort(numbers))
264
+ print(jugaadcode.insertion_sort(numbers))
265
+ print(jugaadcode.merge_sort(numbers))
266
+ print(jugaadcode.quick_sort(numbers))
267
+ print(jugaadcode.counting_sort(numbers))
268
+ ```
269
+
270
+ Check whether a sorting function modifies the original list or returns a new list before relying on that behavior.
271
+
272
+ ---
273
+
274
+ # 6. Dynamic Programming Algorithms
275
+
276
+ Dynamic programming helps solve problems by reusing results from smaller subproblems.
277
+
278
+ | Function | Description | Example |
279
+ |---|---|---|
280
+ | `climbing_stairs(n)` | Calculates the number of ways to climb stairs | `jugaadcode.climbing_stairs(5)` |
281
+ | `coin_change(coins, amount)` | Solves a coin-change problem | `jugaadcode.coin_change([1, 2, 5], 11)` |
282
+
283
+ ### Examples
284
+
285
+ ```python
286
+ import jugaadcode
287
+
288
+ print(jugaadcode.climbing_stairs(5))
289
+ print(jugaadcode.coin_change([1, 2, 5], 11))
290
+ ```
291
+
292
+ The exact result and interpretation depend on each implementation's definition of the problem—for example, whether `coin_change()` returns the minimum number of coins or another representation.
293
+
294
+ ---
295
+
296
+ # 7. Stack, Matrix, and Linked-List Algorithms
297
+
298
+ | Function | Description | Example |
299
+ |---|---|---|
300
+ | `valid_parentheses(text)` | Checks whether brackets are properly matched | `jugaadcode.valid_parentheses("({[]})")` |
301
+ | `matrix_transpose(matrix)` | Transposes a matrix | `jugaadcode.matrix_transpose([[1, 2], [3, 4]])` |
302
+ | `reverse_linked_list(head)` | Reverses a linked list | `jugaadcode.reverse_linked_list(head)` |
303
+
304
+ ### Examples
305
+
306
+ ```python
307
+ import jugaadcode
308
+
309
+ print(jugaadcode.valid_parentheses("({[]})"))
310
+ print(jugaadcode.matrix_transpose([[1, 2], [3, 4]]))
311
+ ```
312
+
313
+ For `reverse_linked_list()`, the input must match the linked-list node structure expected by the implementation. Refer to the function's module for the required node format.
314
+
315
+ ---
316
+
317
+ # 8. Using Individual Modules
318
+
319
+ Each algorithm is maintained in its own Python module. You can import functions through the main package or import from the specific module.
320
+
321
+ ### Through the main package
322
+
323
+ ```python
324
+ import jugaadcode
325
+
326
+ print(jugaadcode.is_prime(17))
327
+ ```
328
+
329
+ ### Through an individual module
330
+
331
+ ```python
332
+ from jugaadcode.prime import is_prime
333
+
334
+ print(is_prime(17))
335
+ ```
336
+
337
+ Other module examples:
338
+
339
+ ```python
340
+ from jugaadcode.factorial import factorial
341
+ from jugaadcode.fibonacci import fibonacci
342
+ from jugaadcode.two_sum import two_sum
343
+ from jugaadcode.binary_search import binary_search
344
+ from jugaadcode.bubble_sort import bubble_sort
345
+ ```
346
+
347
+ Individual module imports can be useful when you want to work with only one algorithm.
348
+
349
+ ---
350
+
351
+ # 9. Error Handling
352
+
353
+ Some functions reject invalid input, such as negative values for factorial or trailing-zero calculations.
354
+
355
+ You can handle errors using `try` and `except`:
356
+
357
+ ```python
358
+ import jugaadcode
359
+
360
+ try:
361
+ result = jugaadcode.factorial(-5)
362
+ print(result)
363
+ except ValueError as error:
364
+ print("Invalid input:", error)
365
+ ```
366
+
367
+ Always check the relevant function implementation for its supported input types, constraints, and error behavior.
368
+
369
+ ---
370
+
371
+ # 10. Requirements
372
+
373
+ - Python 3.9 or later
374
+ - No additional dependencies are required for the basic algorithms, provided the package implementation remains dependency-free.
375
+
376
+ # 11. Version
377
+
378
+ Current release: **0.1.1** (update this value to match the version you publish).
379
+
380
+ # 12. Author
381
+
382
+ **Mohamed Faraazman Bin Farooq S**
383
+
384
+ # 13. License
385
+
386
+ Add your chosen open-source license before distributing the project—for example, the MIT License—and include the corresponding `LICENSE` file.
387
+
388
+ # 14. Contributing
389
+
390
+ Suggestions, bug reports, and contributions to improve the library are welcome.
391
+
392
+ If you find an issue or want to add a useful algorithm, create an issue or submit a pull request in the project's source repository.
393
+
394
+ ---
395
+
396
+ **Install `jugaadcode`, import the algorithms you need, and focus on solving problems rather than rewriting common logic.**