ARRAYS (implemented from scratch)

Поделиться
HTML-код
  • Опубликовано: 1 дек 2024

Комментарии • 19

  • @jamesperalta35
    @jamesperalta35  4 часа назад

    Just dropped 6 new videos! “Everything you need to know” and “Implemented from scratch” for LinkedLists, Stacks, and Queues. Happy December y’all! 🎄
    Playlist: m.ruclips.net/p/PL1_cEA1Q0Z8-WO_mXqu8Nf0ObhxhqnBI-

  • @valeriagamez1509
    @valeriagamez1509 18 часов назад +1

    great video!!!🙌💚

  • @shantanukulkarni8883
    @shantanukulkarni8883 День назад +6

    Can you make a video about Natural Talent vs Hard Work? I see so many people who seem naturally good at problem solving. Their IQ is just higher. I know about having a growth mindset and how the brain literally grows when we learn new things... but some people are naturally better at making those connections. Some people learn a lot faster and even retain those things. So it makes me question whether is it even worth it to put in the efforts? I do try to still keep learning, but every so often I see people like you 😅 who are really good, and leads to inferiority complex issues.

    • @jamesperalta35
      @jamesperalta35  День назад +2

      Hey @shantanukulkarni8883 - that's a great video idea! Like you mentioned - I think having a growth mindset is key here and not comparing yourself to others but instead comparing yourself to ONLY yourself from yesterday, yourself from 6 months ago, yourself from 2 years ago. Sounds cliché but what I mean by that is focus on things that you want to learn or gaps in your knowledge and then work to improve those, once you do, look for more gaps and improve those, REPEAT over and over lol... You'll get really good after a couple years of doing that.
      I think it's definitely the case that some people learn faster than others but I still think you can get reallllly good (95th percentile) from just working at it everyday. If you are still trying to keep learning then you are already doing more than a lot of people so keep it up!! Mastery takes time and I'm still striving to get better everyday as well.
      I have more thoughts on this but it probably warrants a full video :). Will post back here when it's uploaded.

    • @johnperaltaCFA
      @johnperaltaCFA 22 часа назад +2

      @@shantanukulkarni8883 lol how do u know this guy has natural talent 😂 I think James’ IQ is lower than average 🤪

    • @jamesperalta35
      @jamesperalta35  15 часов назад +2

      hahah maybe we should do IQ tests on our channels

    • @johnperaltaCFA
      @johnperaltaCFA 15 часов назад +2

      @@jamesperalta35😂 bruh the IQ below average but the work ethic way above average 🤫

    • @jamesperalta35
      @jamesperalta35  15 часов назад +1

      @@johnperaltaCFA hahah will explore this in a dedicated video

  • @johnperaltaCFA
    @johnperaltaCFA 23 часа назад +2

    Lol let me stick with numpy array

  • @mitswadas
    @mitswadas 10 часов назад +1

    Bro you are using array to implement array this is not from scratch

    • @jamesperalta35
      @jamesperalta35  9 часов назад

      I’m demonstrating how to use an Array (which is fixed size in some languages) to implement a dynamic sizing array. I’m using Python so there’s no concept of a fixed array. But if we were to use Java or any other language where the array is a fixed size then it makes more sense. Either way these principles still hold on how to create a dynamic array from a fixed array.

    • @jamesperalta35
      @jamesperalta35  9 часов назад

      ⁠other sources: www.geeksforgeeks.org/internal-working-of-arraylist-in-java/

    • @jamesperalta35
      @jamesperalta35  9 часов назад

      Go on Chat GPT and ask it to build you an ArrayList from scratch in C and you’ll see the code is very similar to this.

    • @paulnikonowicz
      @paulnikonowicz 52 минуты назад

      @@jamesperalta35 chat GPT is wrong then. here's a hint on how to create an array from scratch in python:
      ```
      import io
      # Create a memory block of 1024 bytes initialized with zeros
      memory_block = io.BytesIO(bytearray(1024))
      # Write the number 4 to the third byte (index 2, since indexing starts at 0)
      memory_block.seek(2) # Move the cursor to the third byte
      memory_block.write(b'\x04') # Write the value 4 as a single byte
      # To verify the change, read back the third byte
      memory_block.seek(2)
      third_byte = memory_block.read(1)
      print(f"Third byte value: {third_byte[0]}") # Should output 4
      ```

  • @mitswadas
    @mitswadas 10 часов назад

    And you just implemented a wierd queue data structure 😂😂. You are not even memory managing it.

    • @jamesperalta35
      @jamesperalta35  9 часов назад

      In Python, memory management is handled automatically under the hood by the Python memory manager and garbage collector. Do you know of another way I could have implemented this?

    • @jamesperalta35
      @jamesperalta35  9 часов назад

      @@mitswadas also it’s not really a queue 😁 Queues are implemented using LinkedLists for 0(1) deletions from the front and I have a separate video coming soon on that.