When we watch a film or a play, we know that the actors probably learned their lines from a script, which essentially tells them what to say and when to say it. A piece of written music operates on exactly the same principle. In a very basic sense, it tells a performer what to play and when to play it. Aesthetically speaking, there’s a world of difference between, say, Beethoven and Justin Bieber, but both artists have used the same building blocks to create their music: notes. And although the end result can sound quite complicated, the logic behind musical notes is actually pretty straightforward. Let’s take a look at the foundational elements to music notation and how they interact to create a work of art. Music is written on five parallel lines that go across the page. These five lines are called a staff, and a staff operates on two axes: up and down and left to right. The up-and-down axis tells the performer the pitch of the note or what note to play, and the left-to-right axis tells the performer the rhythm of the note or when to play it. Let’s start with pitch. To help us out, we’re going to use a piano, but this system works for pretty much any instrument you can think of. In the Western music tradition, pitches are named after the first seven letters of the alphabet, A, B, C, D, E, F, and G. After that, the cycle repeats itself: A, B, C, D, E, F, G, A, B, C, D, E, F, G, and so on. But how do these pitches get their names? Well, for example, if you played an F and then played another F higher or lower on the piano, you’d notice that they sound pretty similar compared to, say, a B. Going back to the staff, every line and every space between two lines represents a separate pitch. If we put a note on one of these lines or one of these spaces, we’re telling a performer to play that pitch. The higher up on the staff a note is placed, the higher the pitch. But there are obviously many, many more pitches than the nine that these lines and spaces gives us. A grand piano, for example, can play 88 separate notes. So how do we condense 88 notes onto a single staff? We use something called a clef, a weird-looking figure placed at the beginning of the staff, which acts like a reference point, telling you that a particular line or space corresponds to a specific note on your instrument. If we want to play notes that aren’t on the staff, we kind of cheat and draw extra little lines called ledger lines and place the notes on them. If we have to draw so many ledger lines that it gets confusing, then we need to change to a different clef. As for telling a performer when to play the notes, two main elements control this: the beat and the rhythm. The beat of a piece of music is, by itself, kind of boring. It sounds like this. (Ticking) Notice that it doesn’t change, it just plugs along quite happily. It can go slow or fast or whatever you like, really. The point is that just like the second hand on a clock divides one minute into sixty seconds, with each second just as long as every other second, the beat divides a piece of music into little fragments of time that are all the same length: beats. With a steady beat as a foundation, we can add rhythm to our pitches, and that’s when music really starts to happen. This is a quarter note. It’s the most basic unit of rhythm, and it’s worth one beat. This is a half note, and it’s worth two beats. This whole note here is worth four beats, and these little guys are eighth notes, worth half a beat each. “Great,” you say, “what does that mean?” You might have noticed that across the length of a staff, there are little lines dividing it into small sections. These are bar lines and we refer to each section as a bar. At the beginning of a piece of music, just after the clef, is something called the time signature, which tells a performer how many beats are in each bar. This says there are two beats in each bar, this says there are three, this one four, and so on. The bottom number tells us what kind of note is to be used as the basic unit for the beat. One corresponds to a whole note, two to a half note, four to a quarter note, and eight to an eighth note, and so on. So this time signature here tells us that there are four quarter notes in each bar, one, two, three, four; one, two, three, four, and so on. But like I said before, if we just stick to the beat, it gets kind of boring, so we’ll replace some quarter notes with different rhythms. Notice that even though the number of notes in each bar has changed, the total number of beats in each bar hasn’t. So, what does our musical creation sound like? (Music) Eh, sounds okay, but maybe a bit thin, right? Let’s add another instrument with its own pitch and rhythm. Now it’s sounding like music. Sure, it takes some practice to get used to reading it quickly and playing what we see on our instrument, but, with a bit of time and patience, you could be the next Beethoven or Justin Bieber.
Social norms in Canada
Saying Hi!
Make an attempt at small talk with people around you! The easiest way to make connections with neighbours and community is just to talk to everyone & introduce yourself!
Eye Contact
It is customary for Canadians to make eye contact with the person they are talking to, no matter their gender, age or if they are an authority figure, such as a professor or supervisor.
Say Sorry
Canadians say sorry all the time, to everyone, even if it’s not their fault, even if nothing a person does might be considered worthy of saying “sorry” - Canadians will say sorry!
Be On Time
Better be there on time! A habit that many Canadians get into is arriving 15 minutes early to a scheduled event, showing up early shows professionalism - you’re prepared and ready to work.
People expect you to be on time for work, school, medical appointments, and business meetings. You could lose your job or be suspended from school if you are frequently late. People will not wait for more than 10 - 15 minutes for someone late for a business meeting. If you are running late, make sure to contact the person you are meeting, and explain why you are late. For social events, it is expected people arrive on time, up to and no later than half an hour from the time they were invited.
Talk In A Reasonable Range With People
In North America, personal boundaries are essential, and respecting them is even more critical. Talking too close to people can throw off the person who isn’t used to it; some people view it as intimidating, while others just find it awkward. Standing too close isn’t that big of an issue - usually, people will back up to a comfortable distance if they feel you’re too close - but it can contribute to leaving a wrong impression overall when meeting someone for the first time or networking.
When Canadians go to the pharmacy, they stand at least 100 cm away from the person served at the counter. Standing any closer makes Canadians feel uncomfortable - especially in the pharmacy, people think the information they are sharing with the pharmacist is private and therefore gives a significant amount of distance between the customer being served and the person next in line.
Be Courteous On The Bus
say thank you to the bus driver when getting off the bus
Be Inclusive!
Canada is a very diverse place, with many different viewpoints and cultures mixed together. In Canada, though we may disagree with each other’s opinions or lifestyles, it is important to respect everyone regardless of your views. Discrimination or prejudice based on race, sex, religion, or sexual orientation will likely be met with hostility - Canadians strive for politeness.
Hold The Door!
Holding the door open for people is a fundamental part of good manners in Canada.
Do NOT Kiss On The Cheek
just put your hand out to shake
When introduced, Canadians smile and say, “Hello, how are you?” or “Hello, nice to meet you!” It is customary to extend your right hand to shake. To shake hands, grip the other person’s hand firmly but not tightly, and gently pump two to three times.
Personal questions
Unless you are with a friend, it is impolite to ask the following personal questions:
- How much money do you make?
- How much did you pay for your house/car?
- Why aren’t you married?
- Why don’t you have children?
- How old are you?
- How much do you weigh?
Public Behaviour
Loud conversations, name-calling or violence (such as spanking children) are not acceptable. Hitting or threatening another person, including family members, is against the law.
Lineups
Canadians line up at bus stops, banks, stores, restaurants, markets, events, cinema etc. Canadian expect services on a first-come, first-served basis. If there is no lineup, Canadians take turns instead of pushing ahead. People will become angry if you cut into the middle of a line, instead of lining up from the back, or if you push against the person ahead of you.
Holding Hands
Men and women, young children and family members often hold hands in public. It is also acceptable for two men or two women to hold hands.
Respect the environment
Canadians are very proud of our beautiful landscape and are very environmentally conscious. It is expected people do not litter, or leave garbage in the street, on the ground, or throw litter out a car. You can be fined for littering. You are expected to put your trash in the public garbage cans available in most public places.
Smoking
Smoking is not permitted in any public or workplace, including restaurants, bus or taxi shelters (indoor AND outdoor), public vehicles and washrooms. If you smoke, you are not allowed within five meters from the doorway, window or air intake of public or workplace. Ask permission before lighting a cigarette in someone’s home or car.
Volunteer
Volunteering is a great way to get to know the people in your community. Becoming a volunteer is a great way to build skills for future employment in Canada!
LeetCode - Algorithms - 701. Insert into a Binary Search Tree
Problem
701. Insert into a Binary Search Tree
Java
Recursion
© Robert Sedgewick and Kevin Wayne
1 | /** |
Submission Detail
- 35 / 35 test cases passed.
- Runtime: 0 ms, faster than 100.00% of Java online submissions for Insert into a Binary Search Tree.
- Memory Usage: 39.1 MB, less than 98.22% of Java online submissions for Insert into a Binary Search Tree.
LeetCode - Algorithms - 442. Find All Duplicates in an Array
Problem
442. Find All Duplicates in an Array
Java
1
1 | class Solution { |
Submission Detail
- 28 / 28 test cases passed.
- Runtime: 6 ms, faster than 50.21% of Java online submissions for Find All Duplicates in an Array.
- Memory Usage: 64.1 MB, less than 5.07% of Java online submissions for Find All Duplicates in an Array.
LeetCode - Algorithms - 448. Find All Numbers Disappeared in an Array
Problem
448. Find All Numbers Disappeared in an Array
Java
1
1 | class Solution { |
Submission Detail
- 33 / 33 test cases passed.
- Runtime: 6 ms, faster than 37.69% of Java online submissions for Find All Numbers Disappeared in an Array.
- Memory Usage: 64 MB, less than 5.08% of Java online submissions for Find All Numbers Disappeared in an Array.
LeetCode - Algorithms - 1662. Check If Two String Arrays are Equivalent
Problem
1662. Check If Two String Arrays are Equivalent
Java
jdk
1 | class Solution { |
Submission Detail
- 109 / 109 test cases passed.
- Runtime: 0 ms, faster than 100.00% of Java online submissions for Check If Two String Arrays are Equivalent.
- Memory Usage: 36.7 MB, less than 88.84% of Java online submissions for Check If Two String Arrays are Equivalent.
LeetCode - Algorithms - 700. Search in a Binary Search Tree
Problem
700. Search in a Binary Search Tree
Java
Recursion
1 | /** |
Submission Detail
- 36 / 36 test cases passed.
- Runtime: 0 ms, faster than 100.00% of Java online submissions for Search in a Binary Search Tree.
- Memory Usage: 39.7 MB, less than 16.71% of Java online submissions for Search in a Binary Search Tree.
LeetCode - Algorithms - 1365. How Many Numbers Are Smaller Than the Current Number
Problem
1365. How Many Numbers Are Smaller Than the Current Number
Java
1
1 | class Solution { |
Submission Detail
- 103 / 103 test cases passed.
- Runtime: 4 ms, faster than 66.15% of Java online submissions for How Many Numbers Are Smaller Than the Current Number.
- Memory Usage: 38.8 MB, less than 84.14% of Java online submissions for How Many Numbers Are Smaller Than the Current Number.
LeetCode - Algorithms - 771. Jewels and Stones
Problem
Java
1
1 | class Solution { |
Submission Detail
- 255 / 255 test cases passed.
- Runtime: 1 ms, faster than 64.92% of Java online submissions for Jewels and Stones.
- Memory Usage: 37 MB, less than 89.30% of Java online submissions for Jewels and Stones.
LeetCode - Algorithms - 1528. Shuffle String
Problem
Java
1
1 | class Solution { |
Submission Detail
- 399 / 399 test cases passed.
- Runtime: 2 ms, faster than 28.58% of Java online submissions for Shuffle String.
- Memory Usage: 41.9 MB, less than 5.19% of Java online submissions for Shuffle String.