- 169
- 6 331
ScottHacksCode
Приєднався 14 лип 2023
[SOLVED!] - Find Missing Number - Whiteboard - C#
#coding #interviews #softwareengineering
Find the missing number in an array.
SOCIAL
------
Follow me on Facebook: scott.althaus
Follow me on Instagram: altyrocks
Follow me on TikTok: www.tiktok.com/@altyrocks1
Follow me on Twitter: altyrocks
Find the missing number in an array.
SOCIAL
------
Follow me on Facebook: scott.althaus
Follow me on Instagram: altyrocks
Follow me on TikTok: www.tiktok.com/@altyrocks1
Follow me on Twitter: altyrocks
Переглядів: 5
Відео
[SOLVED!] - Nim Game - LeetCode 292 - Java
Переглядів 92 місяці тому
#coding #interviews #softwareengineering #interviews #softwareengineering #puzzles You are playing the following Nim Game with your friend: Initially, there is a heap of stones on the table. You and your friend will alternate taking turns, and you go first. On each turn, the person whose turn it is will remove 1 to 3 stones from the heap. The one who removes the last stone is the winner. Given ...
[SOLVED!] - Palindrome Permutation - LeetCode 266 - Java
Переглядів 72 місяці тому
#coding #interviews #softwareengineering #interviews #softwareengineering #puzzles Given a string s, return true if a permutation of the string could form a palindrome and false otherwise. Link to problem: leetcode.com/problems/palindrome-permutation/description/ SOCIAL Follow me on Facebook: scott.althaus Follow me on Instagram: altyrocks Follow me on TikTok: www.ti...
[SOLVED!] - Strobogrammatic Number - LeetCode 246 - Java
Переглядів 522 місяці тому
#coding #interviews #softwareengineering #interviews #softwareengineering #puzzles Given a string num which represents an integer, return true if num is a strobogrammatic number. A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down). Link to problem: leetcode.com/problems/strobogrammatic-number/description/ SOCIAL Follow me on Facebook: facebo...
[SOLVED!] - Excel Sheet Column Number - LeetCode 171 - Java
Переглядів 142 місяці тому
#coding #interviews #softwareengineering #interviews #softwareengineering #puzzles Given a string columnTitle that represents the column title as appears in an Excel sheet, return its corresponding column number. Link to problem: leetcode.com/problems/excel-sheet-column-number/description/ SOCIAL Follow me on Facebook: scott.althaus Follow me on Instagram: altyrocks ...
[SOLVED!] - FizzBuzz - Whiteboard - C#
Переглядів 115 місяців тому
#coding #interviews #softwareengineering Pass in a number and return Fizz if it's divisible by 3, return Buzz if it's divisible by 5, and return FizzBuzz if it's divisible by both 3 and 5. SOCIAL Follow me on Facebook: scott.althaus Follow me on Instagram: altyrocks Follow me on TikTok: www.tiktok.com/@altyrocks1 Follow me on Twitter: altyrocks
[SOLVED!] - Check If Two String Arrays are Equivalent - LeetCode 1662 - Java
Переглядів 115 місяців тому
#coding #interviews #softwareengineering Link to problem: leetcode.com/problems/check-if-two-string-arrays-are-equivalent/description/ Follow me on Facebook: scott.althaus Follow me on Instagram: altyrocks Follow me on TikTok: www.tiktok.com/@altyrocks1 Follow me on Twitter: altyrocks
[SOLVED!] The Bankrupt Man - Puzzles
Переглядів 35 місяців тому
#interviews #softwareengineering #puzzles A man pushes his car to a hotel and yells "I'm bankrupt!". Why? SOCIAL Follow me on Facebook: scott.althaus Follow me on Instagram: altyrocks Follow me on TikTok: www.tiktok.com/@altyrocks1 Follow me on Twitter: altyrock
[SOLVED!] - The Cowboy and The Horse - Puzzles
Переглядів 35 місяців тому
#interviews #softwareengineering #puzzles A man rides into town on Friday, stays 3 days, and leaves on Friday. How is this possible? SOCIAL Follow me on Facebook: scott.althaus Follow me on Instagram: altyrocks Follow me on TikTok: www.tiktok.com/@altyrocks1 Follow me on Twitter: altyrock
[SOLVED!] Java List - HackerRank
Переглядів 25 місяців тому
#coding #interviews #softwareengineering Link to problem: leetcode.com/problems/triangle-judgement/description/ SOCIAL Follow me on Facebook: scott.althaus Follow me on Instagram: altyrocks Follow me on TikTok: www.tiktok.com/@altyrocks1 Follow me on Twitter: altyrocks
[SOLVED!] Triangle Judgement - LeetCode #610 - SQL
Переглядів 255 місяців тому
#coding #interviews #softwareengineering Link to problem: leetcode.com/problems/triangle-judgement/description/ In SQL, (x, y, z) is the primary key column for this table. Each row of this table contains the lengths of three line segments. Report for every three line segments whether they can form a triangle. Return the result table in any order. The result format is in the following example. E...
[SOLVED!] Factorial Recursive - C#
Переглядів 66 місяців тому
#coding #interviews #softwareengineering SOCIAL Follow me on Facebook: scott.althaus Follow me on Instagram: altyrocks Follow me on TikTok: www.tiktok.com/@altyrocks1 Follow me on Twitter: altyrocks
[SOLVED!] The Lock Box
6 місяців тому
#interviews #softwareengineering #puzzles SOCIAL Follow me on Facebook: scott.althaus Follow me on Instagram: altyrocks Follow me on TikTok: www.tiktok.com/@altyrocks1 Follow me on Twitter: altyrock
[SOLVED!] Java 1D Array - HackerRank
Переглядів 16 місяців тому
#coding #interviews #softwareengineering Link to problem: www.hackerrank.com/challenges/java-1d-array-introduction/problem SOCIAL Follow me on Facebook: scott.althaus Follow me on Instagram: altyrocks Follow me on TikTok: www.tiktok.com/@altyrocks1 Follow me on Twitter: altyrocks
[SOLVED!] Find Closest Number to Zero - LeetCode #2239 - Java
Переглядів 5636 місяців тому
#coding #interviews #softwareengineering Link to problem: leetcode.com/problems/find-closest-number-to-zero/description/ Given an integer array nums of size n, return the number with the value closest to 0 in nums. If there are multiple answers, return the number with the largest value. Example 1: Input: nums = [-4,-2,1,4,8] Output: 1 Explanation: The distance from -4 to 0 is |-4| = 4. The dist...
[SOLVED!] The Fox, The Chicken, And The Grain Puzzle
Переглядів 46 місяців тому
[SOLVED!] The Fox, The Chicken, And The Grain Puzzle
[SOLVED!] Java Inherface - HackerRank
Переглядів 146 місяців тому
[SOLVED!] Java Inherface - HackerRank
[SOLVED!] Count Elements With Maximum Frequency - LeetCode 3005 - Java
Переглядів 196 місяців тому
[SOLVED!] Count Elements With Maximum Frequency - LeetCode 3005 - Java
[SOLVED!] Are These Words Permutations? - C#
Переглядів 86 місяців тому
[SOLVED!] Are These Words Permutations? - C#
[SOLVED!] Shortest Word Distance - LeetCode 243 - Java
Переглядів 396 місяців тому
[SOLVED!] Shortest Word Distance - LeetCode 243 - Java
[SOLVED!] Java Inheritance II - HackerRank
Переглядів 406 місяців тому
[SOLVED!] Java Inheritance II - HackerRank
[SOLVED!} Is This String Unique? - C#
Переглядів 46 місяців тому
[SOLVED!} Is This String Unique? - C#
[SOLVED!] Java Inheritance I - HackerRank
Переглядів 56 місяців тому
[SOLVED!] Java Inheritance I - HackerRank
[SOLVED!] To Be Or Not To Be - LeetCode 2704 - JavaScript
Переглядів 686 місяців тому
[SOLVED!] To Be Or Not To Be - LeetCode 2704 - JavaScript
Nice solution thanks man. Question: Where is that debugger? is that in an IDE or leet code?
Nice solution. Keep it up bro. !
Bro… Explain the intuition of WHY this works. Literally anyone doing leetcode can read what you wrote line by line but if people don’t understand WHY we set p -> q in the case there’s no parent, and WHY them meeting means we’ve found a LCA, then your little video just either shows us you have an awful ability to communicate or no actual understanding of why this works. Submitting with no explanation and going “ezpz” is nuts lmao. If someone wrote this up and didn’t explain why it works they’d get insta-rejected. Awful.
Agreed. Was looking for a reason why in the world do we set p1 to q or the other way around...
{-8,-4,-2,-1,2,4,8} your logic is failed at this test case
Thanks Scott, this was really helpful. Cheers!
Hey scott if possible add a dsa sheet for beginner,loving your lecture i am learning a lot from u❤❤❤ love from India
in second loop you write == instead of ++
Thanks for the video, I have a question. in the question it states that we need to return a promise, how is this returning a promise?
Works perfectly and so easy to follow, especially when you take us through the debugger. Thank you! <3
Thank you! Appreciate the positive comment!
now some will only get frosting 😂🤌
Haha, I didn’t factor that in! 😀
ScottHacksCode, Your videos always make me happy, so I subscribed!
You can sort the intervals array directly based on the start time and then do the comparison. That way, the space complexity will be O(1)
Good advice. Thank you for your comment.
Promo sm
Found in recommendation. Subbed.
So there are still about 6% of Java implementations faster, makes me really curious what those implementations are. But overall nice solution to the challenge.
Love the work ❤ Can the playlist arranged in question sequence to easily surf ☺️