Spooky Sale: 10% off Premium yearly · $118.80 for the first year · until Nov 6Get it

Deep-ML
Learn
Problems1,200+ hands-on ML problemsLearning PathA guided route through the fundamentalsLabsInteractive labs on real techniquesProjectsBuild a GPT, an RL agent, CUDA kernelsCollectionsCurated problem sets and videosMathPen-and-paper math for MLIntuitionInvent the idea behind the formula yourselfPlaylistsYour own problem lists, shareableStudy AssistantAn AI teacher that knows your progress
Interview Prep
Compete
ContestsFresh problem sets, ranked liveLeaderboardWhere you stand, globallyBuddiesSolve with a friend: streaks, a weekly board, chat
Discuss
Deep-Path
Premium
      Intuition
      70 of 102

      Same rule everywhere

      A photo is a grid of pixels, each a brightness (0 = black). Take one row of it. Write blur(row): soften the row by mixing each pixel with its two neighbours. Return one value per pixel that has a neighbour on both sides, so a row of 6 pixels gives 4.

      One row of a photo, each pixel a brightness drawn as its grey. A window takes each pixel with its two neighbours, slides along, and leaves one blurred pixel under each middle one. You can see each blurred pixel’s grey: what number is it?

      One row of a photo. Each pixel is a brightness: 0 is black.the row283914blurredclick a blurred pixel to see the three it’s made from
      Your functionblur(row)
      rowpixel brightnesses, left to righte.g. [5, 5, 5, 5, 5]
      returnsone value per pixel that has both neighbours
      solution.pyLoading Python
      Sign in for an AI hint
      ← Never be 100% sureHow far can it see? →