Notes, summaries, assignments, exams, and problems

Sort by
Subject
Level

Sorting, Searching, and Graph Algorithms in Computer Science

Classified in Computers

Written on in English with a size of 4.11 KB

Insertion Sort Algorithm

def insertion_sort(arr) :

for i in range(1, len(arr)):

key = arr[i]

j = i - 1

while j >= 0 and key < arr[j]:

arr[j + 1] = arr[j]

j -= 1

arr[j + 1] = key

# Example usage:

arr = [12, 11, 13, 5, 6]

insertion_sort(arr)

print("Sorted array is:", arr)

Binary Search Algorithm

def binary_search(arr, target):

left, right = 0, len(arr) - 1

while left <= right:

mid = (left + right) // 2

if arr[mid] == target:

return mid

elif arr[mid] < target:

left = mid + 1

else:

right = mid - 1

return -1

# Example usage:

arr = [2, 3, 4, 10, 40]

target = 10

result = binary_search(arr, target)

if result != -1:

print("Element

... Continue reading "Sorting, Searching, and Graph Algorithms in Computer Science" »

Hypothesis Testing: A Concise Statistical Method Reference

Classified in Mathematics

Written on in English with a size of 4.2 KB

Hypothesis Testing

Statistical Test Selection

1. If the population standard deviation is unknown and the sample size is less than 30: t-test

2. If the population standard deviation is known and the sample size is less than 30: t-test

7. Hypothesis test on population mean; n = 25; σ = 2.5: z-test

8. Hypothesis test on population mean; n = 50; s = 7.2: z-test

18. Test statistic for sample size above 30: z-test

19. Test statistic when population standard deviation is known: z-test

20. Test statistic when population standard deviation is unknown: t-test

21. When to use the t-test: I and II

24. Optimal sample size for z-test: Equal to or larger than 30

Hypotheses and Significance

3. H0: μ = 30

4. H1: μ > 30

5. No

9. False: The alternative hypothesis typically... Continue reading "Hypothesis Testing: A Concise Statistical Method Reference" »

The Detrimental Effects of Overprotective Parenting on Child Development

Classified in Language

Written on in English with a size of 3.77 KB

Unit 9: Language Practice Solutions

Section 1: Verb Phrases and Structures (1-17)

  1. got asked
  2. got my hair done
  3. got myself prepared
  4. were held up
  5. was put
  6. made us complete
  7. was shown
  8. got interviewed
  9. were you asked
  10. print my reference out
  11. did you get to send
  12. got me to answer
  13. had me confused
  14. will be informed ('ll be informed)
  15. have been shortlisted ('ve been shortlisted)
  16. get them begging
  17. is said to be ('s said to be)

Section 2: Noun Forms (1-13)

  1. legislation
  2. objection
  3. announcement
  4. dismissal
  5. notification
  6. resemblance
  7. indication
  8. renewal
  9. assurance
  10. reiteration
  11. embarrassment
  12. gratification
  13. assailant

Section 3: Phrasal Components (1-8)

  1. on
  2. listen
  3. up
  4. prick
  5. play
  6. earful
  7. heard
  8. coming

Section 4: Vocabulary/Verbs (1-7)

  1. boosts
  2. impair
  3. hampered
  4. endorse
  5. encounter
  6. wriggle
  7. exploit

Section 5: Collocations/Adverbs (1-5)

  1. tendency
  2. comes
  3. finds
  4. times
  5. always

Letter

... Continue reading "The Detrimental Effects of Overprotective Parenting on Child Development" »

Essential Cell Organelles & Structures Explained

Classified in Biology

Written on in English with a size of 6.6 KB

Microtubules: Structure & Cellular Functions

Microtubules are dynamic polymers of tubulin proteins that form a crucial part of the eukaryotic cell's cytoskeleton, providing essential structure and shape. They are formed by the polymerization of a dimer of two globular proteins—alpha and beta tubulin—into protofilaments, which then associate laterally to form the hollow microtubule structure.

The microtubule cytoskeleton is extensively involved in the transport of materials within cells, a process carried out by motor proteins that move along the microtubule surface. They also constitute the internal structure of cilia and flagella, enabling cellular motility. Furthermore, microtubules provide platforms for intracellular transport and... Continue reading "Essential Cell Organelles & Structures Explained" »

Mastering English: Advanced Grammar and Vocabulary Practice

Classified in English

Written on in English with a size of 3.7 KB

English Language Practice: Advanced Skills Review

1. Essential Collocations and Phrases

  • a. They are engaged.
  • b. Don't ignore.
  • c. I envy you.
  • d. A very nice discount.
  • e. Could I borrow?
  • f. They got divorced.
  • g. My favorite shopping spree.
  • h. If you can lend, pay back.
  • i. In my budget.
  • j. We have grown apart.

2. Mastering Prepositions

  • Don't stare at.
  • Are going to be on.
  • Always depend on.
  • Complaining about.
  • We have run out of.

3. Gerunds and Infinitives in Use

  • Keen on going.
  • Have decided to buy.
  • We can afford to eat.
  • Smoking is a bad habit.
  • We stopped to say.

4. Business and Money Idioms

  • Been on another shopping spree.
  • They will go out of business.
  • Only just make ends meet.
  • I'm going to be worth it.
  • I'm not sure it will foot the bill.
  • Is going to shop around.
  • If you live beyond
... Continue reading "Mastering English: Advanced Grammar and Vocabulary Practice" »

Reported Speech: Statements, Questions, Requests & Commands

Classified in English

Written on in English with a size of 2.96 KB

Reported Speech

Statements

  1. She said (that) he worked in a bank.
  2. She told me (that) they went out last night.
  3. She said (that) she was coming.
  4. She told me (that) she had been waiting for the bus when he arrived.
  5. She said (that) she had never been there before.
  6. She told me (that) she didn't go to the party.
  7. She said (that) Lucy would come later.
  8. She told me (that) he hadn't eaten breakfast.
  9. She said (that) she could help me tomorrow.
  10. She told me (that) I should go to bed early.
  11. She told me (that) she didn't like chocolate.
  12. She said (that) she wouldn't see me tomorrow.
  13. She said (that) she was living in Paris for a few months.
  14. She told me (that) she visited her parents at the weekend.
  15. She said (that) she hadn't eaten sushi before.
  16. She said (that) she hadn't travelled
... Continue reading "Reported Speech: Statements, Questions, Requests & Commands" »

Daily Digest: Pop Culture, Community News, and Style Reflections

Classified in English

Written on in English with a size of 3.91 KB

Stranger Things: A Thrilling Netflix Series Review

Stranger Things is a thrilling and suspenseful Netflix original series that masterfully combines science fiction with horror. Set in the 1980s, the story unfolds amidst mysterious occurrences in the small town of Hawkins.

Unraveling the Mystery of Hawkins

The narrative begins with the sudden disappearance of a boy named Will. His friends and family embark on a desperate search, encountering a girl with extraordinary psychokinetic powers named Eleven. As the series progresses, they uncover deep government secrets, explore alternate dimensions, and confront terrifying creatures. Each season introduces new characters and escalating adventures, maintaining high viewer engagement.

Why Stranger Things

... Continue reading "Daily Digest: Pop Culture, Community News, and Style Reflections" »

Board Meeting Minutes - May 20, 2024

Classified in Other subjects

Written on in English with a size of 2.55 KB

Board Meeting Minutes

Date: May 20, 2024

Present:

  • John Smith (Chairman)
  • Sarah Johnson (CEO)
  • Michael Lee (CFO)
  • Emily Clark (COO)
  • David Brown (Head of Logistics)

Absent:

None

1. Call to Order/Opening Remarks

The meeting commenced promptly at 9:00 AM, with John Smith, the Chairman, presiding. John Smith welcomed all attendees and expressed gratitude for their participation.

2. Approval of the Minutes from May 15, 2024

Motion: To approve the minutes of the previous meeting held on May 15, 2024, as circulated.

Motion By: Sarah Johnson

Seconded By: Michael Lee

Carried unanimously by all present members.

3. Additions to the Agenda

No additional items were proposed for inclusion in the agenda.

4. Approval of the Agenda

Motion: To approve the agenda as circulated.

Motion

... Continue reading "Board Meeting Minutes - May 20, 2024" »

Python Regex Essentials & Understanding 'self' in OOP

Classified in Computers

Written on in English with a size of 2.55 KB

Python Regular Expressions: Pattern Matching Power

Regular expressions (regex) are a powerful tool for pattern matching and text manipulation. They allow you to search for patterns within strings, extract specific information, and perform text transformations. Python provides the re module for working with regular expressions.

Basic Regular Expression Components

  1. Literals: Characters that match themselves.
  2. Metacharacters: Special characters with special meanings, such as . (matches any character) and * (matches zero or more occurrences).
  3. Character Classes: [...] matches any single character within the brackets.
  4. Anchors: ^ matches the start of a string, $ matches the end of a string.
  5. Quantifiers: * matches zero or more occurrences, + matches one or
... Continue reading "Python Regex Essentials & Understanding 'self' in OOP" »

Cherished Memories: Sharing Favorite Past Events

Classified in English

Written on in English with a size of 2.7 KB

Sharing Favorite Past Events

Alexis: Alright, let’s get started with sharing about our favorite past events. I think it’s a great way to practice our English. I’ll begin. Last summer, I went to my cousin's wedding. It was absolutely beautiful. While the couple was exchanging their vows, the emotion in the air was palpable; some of the guests started crying.

Alexis: Definitely! After the ceremony, there was a reception under the stars. Everyone was dancing and celebrating. While the band played classic hits, the newlyweds had their first dance. It was like something out of a fairy tale. The whole event was not just about the couple but also about bringing two families together in joy.

Alexis: I agree, John. It’s those moments of connection... Continue reading "Cherished Memories: Sharing Favorite Past Events" »