├── .turbo
├── cookies
│ └── 1.cookie
└── daemon
│ ├── 393a45f584515f12-turbo.log.2025-09-14
│ ├── 393a45f584515f12-turbo.log.2025-09-15
│ └── 393a45f584515f12-turbo.log.2025-09-21
├── .husky
└── pre-commit
├── apps
└── www
│ ├── entities
│ ├── resource
│ │ ├── index.ts
│ │ ├── model
│ │ │ └── types.ts
│ │ └── lib
│ │ │ └── faviconUtils.ts
│ ├── completions
│ │ ├── model
│ │ │ └── types.ts
│ │ ├── api
│ │ │ ├── getCompletions.ts
│ │ │ ├── deleteCompletions.ts
│ │ │ └── createCompletions.ts
│ │ └── hooks
│ │ │ └── useCompletions.ts
│ ├── roadmap
│ │ ├── model
│ │ │ ├── index.ts
│ │ │ ├── constants.ts
│ │ │ └── types.ts
│ │ ├── api
│ │ │ ├── index.ts
│ │ │ └── getRoadmaps.ts
│ │ ├── ui
│ │ │ └── index.ts
│ │ └── lib
│ │ │ └── parseRoadmap.ts
│ ├── category
│ │ ├── ui
│ │ │ └── index.ts
│ │ ├── model
│ │ │ ├── constants.ts
│ │ │ ├── index.ts
│ │ │ └── types.ts
│ │ ├── api
│ │ │ └── index.ts
│ │ ├── index.ts
│ │ ├── lib
│ │ │ └── mapCategoriesWithCount.ts
│ │ └── config
│ │ │ └── metadata.ts
│ ├── blog
│ │ ├── model
│ │ │ ├── index.ts
│ │ │ └── types.ts
│ │ ├── ui
│ │ │ ├── index.ts
│ │ │ └── BlogDetail.tsx
│ │ ├── api
│ │ │ ├── index.ts
│ │ │ └── getBlogBySlug.ts
│ │ └── index.ts
│ ├── challenge
│ │ ├── model
│ │ │ ├── templates
│ │ │ │ ├── common.ts
│ │ │ │ ├── tests.ts
│ │ │ │ ├── static.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── vanilla.ts
│ │ │ └── constants.ts
│ │ ├── lib
│ │ │ ├── cleanUpReadme.ts
│ │ │ ├── sortChallengesByDifficulty.ts
│ │ │ ├── sortChallengesByDate.ts
│ │ │ ├── parseMetaInfo.ts
│ │ │ └── useSyncScopeToSessionStorage.ts
│ │ ├── api
│ │ │ ├── index.ts
│ │ │ ├── getChallengesByTag.ts
│ │ │ ├── getAllChallengesTags.ts
│ │ │ ├── templates
│ │ │ │ └── getTemplatesAvailable.ts
│ │ │ ├── getChallenges.ts
│ │ │ └── getChallengeInfoByLocale.ts
│ │ └── context
│ │ │ └── ChallengeProvider.tsx
│ ├── comment
│ │ ├── model
│ │ │ └── types.ts
│ │ └── hooks
│ │ │ └── useComment.ts
│ └── answer
│ │ └── hooks
│ │ └── useAnswers.ts
│ ├── public
│ ├── robots.txt
│ ├── og.png
│ ├── favicon.ico
│ ├── images
│ │ ├── logo-2.png
│ │ ├── auth-github-bg.png
│ │ ├── logo-readme-dark.png
│ │ ├── logo-readme-light.png
│ │ └── logo.svg
│ └── questions
│ │ └── rtl-icon-1.png
│ ├── screens
│ ├── home
│ │ └── index.ts
│ ├── categories
│ │ ├── index.ts
│ │ └── ui
│ │ │ └── index.ts
│ ├── challenges
│ │ └── ui
│ │ │ └── index.ts
│ ├── roadmaps
│ │ └── ui
│ │ │ ├── index.ts
│ │ │ ├── RoadmapDetailPage.tsx
│ │ │ └── RoadmapsListPage.tsx
│ ├── blog
│ │ └── ui
│ │ │ ├── BlogDetailPage.tsx
│ │ │ └── BlogListPage.tsx
│ └── playground
│ │ └── lib
│ │ ├── getFilesFromLocalStorage.ts
│ │ └── getTemplateFromURL.ts
│ ├── shared
│ ├── api
│ │ └── supabase
│ │ │ ├── index.ts
│ │ │ └── client.ts
│ ├── styles
│ │ └── utilities.css
│ ├── config
│ │ ├── storage.ts
│ │ ├── locale.ts
│ │ └── paths.ts
│ ├── lib
│ │ ├── pipe.ts
│ │ ├── string
│ │ │ └── escapeHtml.ts
│ │ ├── i18n
│ │ │ ├── getFileNameByLocale.ts
│ │ │ ├── translate.ts
│ │ │ └── getLocaleVariations.ts
│ │ ├── sessionStorage.ts
│ │ ├── localStorage.ts
│ │ └── bundleMarkdown.ts
│ ├── model
│ │ └── store.ts
│ ├── context
│ │ ├── ThemeProvider.tsx
│ │ └── QueryProvider.tsx
│ └── ui
│ │ ├── mdx
│ │ └── MDXComponent.tsx
│ │ └── FullPageLoader.tsx
│ ├── .vscode
│ └── settings.json
│ ├── postcss.config.js
│ ├── app
│ ├── (default)
│ │ ├── blog
│ │ │ ├── page.tsx
│ │ │ └── [slug]
│ │ │ │ └── page.tsx
│ │ ├── roadmaps
│ │ │ └── page.tsx
│ │ ├── page.tsx
│ │ ├── challenges
│ │ │ └── page.tsx
│ │ ├── categories
│ │ │ └── [category]
│ │ │ │ └── page.tsx
│ │ └── layout.tsx
│ ├── (editor)
│ │ ├── submit
│ │ │ ├── quiz
│ │ │ │ └── page.tsx
│ │ │ ├── theory
│ │ │ │ └── page.tsx
│ │ │ └── question
│ │ │ │ └── page.tsx
│ │ ├── layout.tsx
│ │ ├── challenges
│ │ │ └── [slug]
│ │ │ │ └── page.tsx
│ │ └── play
│ │ │ ├── page.tsx
│ │ │ └── loading.tsx
│ └── sitemap.ts
│ ├── features
│ ├── code-editor
│ │ ├── lib
│ │ │ ├── formatFileName.ts
│ │ │ ├── enableEmmet.ts
│ │ │ └── setLanguage.ts
│ │ ├── hooks
│ │ │ ├── useLayout.tsx
│ │ │ └── useSandpackLocal.ts
│ │ └── ui
│ │ │ └── Console.tsx
│ ├── leaderboard
│ │ ├── hooks
│ │ │ └── useLeaderboard.ts
│ │ └── ui
│ │ │ └── Leaderboard.tsx
│ ├── auth
│ │ ├── hooks
│ │ │ └── useAuth.ts
│ │ ├── ui
│ │ │ └── UserNav.tsx
│ │ └── api
│ │ │ └── getAuthUser.ts
│ ├── submission-theory
│ │ ├── model
│ │ │ └── formSchema.ts
│ │ └── ui
│ │ │ └── FormHeader.tsx
│ ├── submission-quiz
│ │ └── model
│ │ │ └── formSchema.ts
│ └── submission-question
│ │ └── model
│ │ └── formSchema.ts
│ ├── next.config.js
│ ├── components
│ ├── ui
│ │ ├── aspect-ratio.tsx
│ │ ├── skeleton.tsx
│ │ ├── collapsible.tsx
│ │ ├── link.tsx
│ │ ├── icon-button.tsx
│ │ ├── label.tsx
│ │ ├── separator.tsx
│ │ ├── toaster.tsx
│ │ ├── index.ts
│ │ └── progress.tsx
│ └── icons
│ │ ├── XIcon.tsx
│ │ ├── ChevronRightIcon.tsx
│ │ ├── ChevronDownIcon.tsx
│ │ ├── ChevronLeftIcon.tsx
│ │ ├── ChevronUpIcon.tsx
│ │ ├── LogClearIcon.tsx
│ │ ├── SpinnerIcon.tsx
│ │ ├── LogErrorIcon.tsx
│ │ ├── LogAllIcon.tsx
│ │ ├── VueColorIcon.tsx
│ │ ├── ExpandHorizontalIcon.tsx
│ │ ├── ExpandVerticalIcon.tsx
│ │ ├── ArrowDownIcon.tsx
│ │ ├── ArrowUpIcon.tsx
│ │ ├── CollapseHorizontalIcon.tsx
│ │ ├── CollapseVerticalIcon.tsx
│ │ ├── CssColorIcon.tsx
│ │ ├── VerticalDotsIcon.tsx
│ │ ├── UserIcon.tsx
│ │ ├── VanillaColorIcon.tsx
│ │ ├── ListIcon.tsx
│ │ ├── CheckIcon.tsx
│ │ └── BugIcon.tsx
│ ├── scripts
│ └── actions
│ │ ├── types.ts
│ │ └── loader.ts
│ ├── components.json
│ ├── utils
│ └── helpers.ts
│ ├── eslint.config.js
│ ├── .gitignore
│ └── tsconfig.json
├── pnpm-workspace.yaml
├── .vscode
└── settings.json
├── challenges
├── 526-useprevious
│ ├── README.md
│ ├── info.yml
│ └── template.react.md
├── 380-news-board
│ ├── template.react.md
│ └── info.yml
├── 40-layout-1
│ ├── info.yml
│ └── template.vanilla.md
├── 6-debounce
│ └── info.yml
├── 10-classnames
│ └── info.yml
├── 13-isempty
│ └── info.yml
├── 35-promise-all
│ └── info.yml
├── 141-range
│ └── info.yml
├── 145-minby
│ └── info.yml
├── 174-re-render-3
│ └── info.yml
├── 18-flatten
│ └── info.yml
├── 20-throttle
│ └── info.yml
├── 32-instanceofclass
│ └── info.yml
├── 364-remounting
│ └── info.yml
├── 372-re-render-5
│ └── info.yml
├── 378-usedebounce
│ └── info.yml
├── 385-usereducer
│ └── info.yml
├── 47-checkbox
│ ├── info.yml
│ └── template.vanilla.md
├── 5-fluid-typography
│ ├── info.yml
│ └── template.vanilla.md
├── 368-re-render-4
│ └── info.yml
├── 37-promise-race
│ └── info.yml
├── 43-promise-any
│ └── info.yml
├── 446-get
│ └── info.yml
├── 449-curry
│ └── info.yml
├── 471-pipe
│ └── info.yml
├── 515-race
│ └── info.yml
├── 16-re-render
│ └── info.yml
├── 366-reconcilation-2
│ └── info.yml
├── 374-stale-callback
│ ├── info.yml
│ └── template.react.md
├── 376-stale-refs
│ ├── info.yml
│ └── template.react.md
├── 49-holy-grail
│ └── info.yml
├── 528-react-memo-and-children
│ ├── info.yml
│ └── README.md
├── 55-memo
│ └── info.yml
├── 360-reconcilation-bug
│ ├── info.yml
│ └── template.react.md
├── 405-sampling
│ ├── info.yml
│ └── README.md
├── 409-maplimit
│ ├── info.yml
│ └── README.md
├── 480-jquery-css
│ ├── info.yml
│ └── README.md
├── 496-json-parse
│ └── info.yml
├── 511-sequence
│ └── info.yml
├── 513-parallel
│ └── info.yml
├── 520-todo-list
│ ├── info.yml
│ ├── template.react.md
│ └── README.md
├── 531-stopwatch
│ ├── info.yml
│ ├── template.react.md
│ └── README.md
├── 399-tic-tac-toe
│ ├── info.yml
│ └── README.md
├── 442-deep-clone
│ └── info.yml
├── 86-chunk
│ └── info.yml
├── 91-stack
│ └── info.yml
├── 95-queue
│ └── info.yml
├── 148-clamp
│ └── info.yml
├── 152-wait
│ └── info.yml
├── 161-reject
│ └── info.yml
├── 188-two-sums
│ └── info.yml
├── 271-clone-graph
│ └── info.yml
├── 321-rotate-matrix
│ └── info.yml
├── 323-spiral-matrix
│ └── info.yml
├── 465-decode-message
│ └── info.yml
├── 491-json-stringify
│ └── info.yml
├── 501-priority-queue
│ └── info.yml
├── 58-event-emitter
│ └── info.yml
├── 158-shuffle
│ └── info.yml
├── 277-valid-tree
│ └── info.yml
├── 295-coin-change
│ └── info.yml
├── 313-merge-intervals
│ └── info.yml
├── 317-meeting-schedule
│ └── info.yml
├── 331-reverse-bits
│ └── info.yml
├── 439-snake-to-camelcase
│ └── info.yml
├── 468-first-bad-version
│ └── info.yml
├── 489-detect-data-type
│ └── info.yml
├── 509-clearalltimeout
│ └── info.yml
├── 109-jest-spyon
│ └── info.yml
├── 169-re-render-2
│ └── info.yml
├── 183-anagrams
│ └── info.yml
├── 197-string-encode-and-decode
│ └── info.yml
├── 203-is-palindrome
│ └── info.yml
├── 285-house-robber
│ └── info.yml
├── 3-use-hover
│ ├── info.yml
│ └── template.react.md
├── 325-set-zeroes-in-matrix
│ └── info.yml
├── 340-escape-the-overflow-hidden
│ └── info.yml
├── 4-use-focus-trap
│ ├── info.yml
│ └── template.react.md
├── 420-promise-finally
│ └── info.yml
├── 474-immutability-helper
│ └── info.yml
├── 117-composibility
│ ├── info.yml
│ └── template.javascript.md
├── 191-anagram-groups
│ └── info.yml
├── 217-validate-parentheses
│ └── info.yml
├── 223-reverse-a-linked-list
│ └── info.yml
├── 227-reorder-linked-list
│ └── info.yml
├── 261-search-for-word
│ └── info.yml
├── 283-climbing-stairs
│ └── info.yml
├── 287-house-robber-ii
│ └── info.yml
├── 293-decode-ways
│ └── info.yml
├── 299-word-break
│ └── info.yml
├── 303-count-paths
│ └── info.yml
├── 311-insert-new-interval
│ └── info.yml
├── 327-number-of-one-bits
│ └── info.yml
├── 333-missing-number
│ └── info.yml
├── 418-dom-to-object
│ └── info.yml
├── 430-custom-promise
│ └── info.yml
├── 455-curry-with-placeholder
│ └── info.yml
├── 99-closure-2
│ └── info.yml
├── 104-queue-using-stack
│ └── info.yml
├── 115-foreach-and-this
│ └── info.yml
├── 179-contains-duplicate
│ └── info.yml
├── 205-three-integer-sum
│ └── info.yml
├── 239-same-binary-tree
│ └── info.yml
├── 275-course-schedule
│ └── info.yml
├── 309-jump-game
│ └── info.yml
├── 319-meeting-schedule-ii
│ └── info.yml
├── 335-sum-of-two-integers
│ └── info.yml
├── 383-can-you-describe-the-reconciliation-process
│ └── info.yml
├── 407-file-explorer
│ └── info.yml
├── 415-test-and-expect
│ └── info.yml
├── 207-max-water-container
│ └── info.yml
├── 235-invert-a-binary-tree
│ └── info.yml
├── 237-depth-of-binary-tree
│ └── info.yml
├── 267-search-for-word-ii
│ └── info.yml
├── 269-count-number-of-islands
│ └── info.yml
├── 281-foreign-dictionary
│ └── info.yml
├── 307-maximum-subarray
│ └── info.yml
├── 329-counting-bits
│ └── info.yml
├── 413-html-string-encoder
│ └── info.yml
├── 78-array-prototype-map
│ └── info.yml
├── 273-pacific-atlantic-water-flow
│ └── info.yml
├── 424-promise-allsettled
│ └── info.yml
├── 503-reorder-array-with-new-indexes
│ ├── info.yml
│ └── README.md
├── 533-trapping-rain-water
│ ├── info.yml
│ └── template.typescript.md
├── 74-array-prototype-filter
│ └── info.yml
├── 82-array-prototype-reduce
│ └── info.yml
├── 194-top-k-frequent-elements
│ └── info.yml
├── 199-products-of-array-excluding-self
│ └── info.yml
├── 201-longest-consecutive-sequence
│ └── info.yml
├── 225-merge-two-sorted-linked-lists
│ └── info.yml
├── 241-subtree-of-a-binary-tree
│ └── info.yml
├── 257-find-median-in-a-data-stream
│ └── info.yml
├── 259-combination-target-sum
│ └── info.yml
├── 279-count-connected-components
│ └── info.yml
├── 291-palindromic-substrings
│ └── info.yml
├── 315-non-overlapping-intervals
│ └── info.yml
├── 403-find-highest-commodity-price
│ └── info.yml
├── 253-binary-tree-maximum-path-sum
│ └── info.yml
├── 263-implement-prefix-tree-trie
│ └── info.yml
├── 297-maximum-product-subarray
│ └── info.yml
├── 411-parallel-async-execution
│ └── info.yml
├── 422-execute-promises-in-series
│ └── info.yml
├── 428-retry-promises-n-times
│ └── info.yml
├── 459-debounce-with-leading-and-trailing
│ └── info.yml
├── 231-linked-list-cycle-detection
│ └── info.yml
├── 247-valid-binary-search-tree
│ └── info.yml
├── 305-longest-common-subsequence
│ └── info.yml
├── 69-two-functions-one-object
│ ├── info.yml
│ └── template.javascript.md
├── 209-best-time-to-buy-and-sell-stock
│ └── info.yml
├── 249-kth-smallest-integer-in-bst
│ └── info.yml
├── 265-design-word-search-data-structure
│ └── info.yml
├── 289-longest-palindromic-substring
│ └── info.yml
├── 301-longest-increasing-subsequence
│ └── info.yml
├── 426-priority-based-promise-executor
│ └── info.yml
├── 215-minimum-window-with-characters
│ └── info.yml
├── 221-find-target-in-rotated-sorted-array
│ └── info.yml
├── 233-merge-k-sorted-linked-lists
│ └── info.yml
├── 245-level-order-traversal-of-binary-tree
│ └── info.yml
├── 219-find-minimum-in-rotated-sorted-array
│ └── info.yml
├── 229-remove-node-from-end-of-linked-list
│ └── info.yml
├── 255-serialize-and-deserialize-binary-tree
│ └── info.yml
├── 358-closure-3
│ ├── info.yml
│ └── solution.md
├── 432-throttle-with-leading-and-trailing
│ └── info.yml
├── 498-sum-function
│ └── info.yml
├── 213-longest-repeating-substring-with-replacement
│ └── info.yml
├── 350-promise-chain-output
│ ├── info.yml
│ └── solution.md
├── 389-useeffect
│ └── info.yml
├── 45-specificity
│ └── info.yml
├── 2-click-outisde
│ ├── info.yml
│ └── template.react.md
├── 251-binary-tree-from-preorder-and-inorder-traversal
│ └── info.yml
├── 243-lowest-common-ancestor-in-binary-search-tree
│ └── info.yml
├── 211-longest-substring-without-repeating-characters
│ └── info.yml
├── 348-promise-resolution-order
│ ├── info.yml
│ └── solution.md
├── 391-useeffect-2
│ └── info.yml
├── 483-node-store
│ └── info.yml
├── 113-losing-this
│ └── info.yml
├── 434-multi-stepper-component
│ └── info.yml
├── 395-react-useeffect-micro-macro-tasks
│ └── info.yml
├── 8-closure
│ ├── info.yml
│ └── solution.md
├── 121-f-prototype
│ ├── info.yml
│ └── solution.md
├── 401-usestate
│ ├── info.yml
│ └── README.md
├── 66-this
│ └── info.yml
├── 346-promise-order
│ └── info.yml
├── 61-logical-operators
│ └── info.yml
├── 393-useeffect-3
│ └── info.yml
├── 1-rtl-icon
│ └── info.yml
├── 123-f-prototype-and-constructor
│ └── info.yml
├── 486-find-corresponding-node
│ └── info.yml
├── 7-promise-order
│ └── info.yml
├── 356-hoisting
│ └── info.yml
├── 352-promise-chain-output-2
│ └── info.yml
├── 137-overriding-constructor
│ └── info.yml
├── 506-object-assign
│ └── info.yml
└── 133-class-and-prototype
│ ├── info.yml
│ └── solution.md
├── .lintstagedrc.json
├── .prettierrc
├── tsconfig.json
├── turbo.json
├── .github
├── ISSUE_TEMPLATE
│ ├── feedback.md
│ ├── bug.md
│ ├── feature_request.md
│ └── answer.md
└── workflows
│ └── issue-pr.yml
├── .gitignore
└── roadmaps
└── javascript
└── info.yml
/.turbo/cookies/1.cookie:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | npx lint-staged
2 |
--------------------------------------------------------------------------------
/apps/www/entities/resource/index.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/apps/www/entities/completions/model/types.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.turbo/daemon/393a45f584515f12-turbo.log.2025-09-14:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.turbo/daemon/393a45f584515f12-turbo.log.2025-09-15:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.turbo/daemon/393a45f584515f12-turbo.log.2025-09-21:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pnpm-workspace.yaml:
--------------------------------------------------------------------------------
1 | packages:
2 | - packages/**
3 | - apps/**
--------------------------------------------------------------------------------
/apps/www/entities/roadmap/model/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./types";
2 |
--------------------------------------------------------------------------------
/apps/www/entities/resource/model/types.ts:
--------------------------------------------------------------------------------
1 | export type Resource = string;
2 |
--------------------------------------------------------------------------------
/apps/www/public/robots.txt:
--------------------------------------------------------------------------------
1 | # Allow all crawlers
2 | User-agent: *
3 | Allow: /
--------------------------------------------------------------------------------
/apps/www/screens/home/index.ts:
--------------------------------------------------------------------------------
1 | export { HomePage } from "./ui/HomePage";
2 |
--------------------------------------------------------------------------------
/apps/www/screens/categories/index.ts:
--------------------------------------------------------------------------------
1 | export { CategoryDetailPage } from "./ui";
2 |
--------------------------------------------------------------------------------
/apps/www/shared/api/supabase/index.ts:
--------------------------------------------------------------------------------
1 | export { createClient } from "./client";
2 |
--------------------------------------------------------------------------------
/apps/www/entities/category/ui/index.ts:
--------------------------------------------------------------------------------
1 | export { CategoryList } from "./CategoryList";
2 |
--------------------------------------------------------------------------------
/apps/www/entities/roadmap/model/constants.ts:
--------------------------------------------------------------------------------
1 | export const ROADMAP_ROOT = "../../roadmaps";
2 |
--------------------------------------------------------------------------------
/apps/www/screens/challenges/ui/index.ts:
--------------------------------------------------------------------------------
1 | export { ChallengesPage } from "./ChallengesPage";
2 |
--------------------------------------------------------------------------------
/apps/www/screens/categories/ui/index.ts:
--------------------------------------------------------------------------------
1 | export { CategoryDetailPage } from "./CategoryDetailPage";
2 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "tailwindCSS.experimental.configFile": "apps/www/app/globals.css"
3 | }
4 |
--------------------------------------------------------------------------------
/apps/www/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "tailwindCSS.experimental.configFile": "./app/globals.css"
3 | }
4 |
--------------------------------------------------------------------------------
/apps/www/shared/styles/utilities.css:
--------------------------------------------------------------------------------
1 | @utility box-trim {
2 | text-box: trim-both cap alphabetic;
3 | }
4 |
--------------------------------------------------------------------------------
/apps/www/entities/blog/model/index.ts:
--------------------------------------------------------------------------------
1 | export type { Blog, BlogListProps, BlogDetailProps } from "./types";
2 |
--------------------------------------------------------------------------------
/apps/www/entities/roadmap/api/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./getRoadmaps";
2 | export * from "./getRoadmapByPath";
3 |
--------------------------------------------------------------------------------
/apps/www/public/og.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsartisan/frontend-challenges/HEAD/apps/www/public/og.png
--------------------------------------------------------------------------------
/apps/www/entities/category/model/constants.ts:
--------------------------------------------------------------------------------
1 | export const CATEGORIES = ["javascript", "css", "react"] as const;
2 |
--------------------------------------------------------------------------------
/apps/www/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | "@tailwindcss/postcss": {},
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/apps/www/shared/config/storage.ts:
--------------------------------------------------------------------------------
1 | export const STORAGE_KEY = "fc";
2 | export const AUTH_TOKEN_KEY = "auth_token";
3 |
--------------------------------------------------------------------------------
/apps/www/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsartisan/frontend-challenges/HEAD/apps/www/public/favicon.ico
--------------------------------------------------------------------------------
/apps/www/entities/blog/ui/index.ts:
--------------------------------------------------------------------------------
1 | export { BlogList } from "./BlogList";
2 | export { BlogDetail } from "./BlogDetail";
3 |
--------------------------------------------------------------------------------
/apps/www/entities/category/model/index.ts:
--------------------------------------------------------------------------------
1 | export type { Category } from "./types";
2 | export { CATEGORIES } from "./constants";
3 |
--------------------------------------------------------------------------------
/apps/www/public/images/logo-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsartisan/frontend-challenges/HEAD/apps/www/public/images/logo-2.png
--------------------------------------------------------------------------------
/apps/www/entities/blog/api/index.ts:
--------------------------------------------------------------------------------
1 | export { getAllBlogs } from "./getAllBlogs";
2 | export { getBlogBySlug } from "./getBlogBySlug";
3 |
--------------------------------------------------------------------------------
/apps/www/shared/lib/pipe.ts:
--------------------------------------------------------------------------------
1 | export const pipe = (value: any, ...fns: ((any) => any)[]) => fns.reduce((acc, fn) => fn(acc), value);
2 |
--------------------------------------------------------------------------------
/apps/www/app/(default)/blog/page.tsx:
--------------------------------------------------------------------------------
1 | import { BlogListPage } from "~/screens/blog/ui/BlogListPage";
2 |
3 | export default BlogListPage;
4 |
--------------------------------------------------------------------------------
/apps/www/entities/category/api/index.ts:
--------------------------------------------------------------------------------
1 | export { getChallengesByCategory, filterChallengesByCategory } from "./getChallengesByCategory";
2 |
--------------------------------------------------------------------------------
/apps/www/entities/roadmap/ui/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./RoadmapListItem";
2 | export * from "./RoadmapList";
3 | export * from "./RoadmapDetail";
4 |
--------------------------------------------------------------------------------
/apps/www/public/images/auth-github-bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsartisan/frontend-challenges/HEAD/apps/www/public/images/auth-github-bg.png
--------------------------------------------------------------------------------
/apps/www/public/questions/rtl-icon-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsartisan/frontend-challenges/HEAD/apps/www/public/questions/rtl-icon-1.png
--------------------------------------------------------------------------------
/challenges/526-useprevious/README.md:
--------------------------------------------------------------------------------
1 | Implement a custom React hook called usePrevious that stores the previous value of a given state or prop.
2 |
--------------------------------------------------------------------------------
/apps/www/public/images/logo-readme-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsartisan/frontend-challenges/HEAD/apps/www/public/images/logo-readme-dark.png
--------------------------------------------------------------------------------
/apps/www/public/images/logo-readme-light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsartisan/frontend-challenges/HEAD/apps/www/public/images/logo-readme-light.png
--------------------------------------------------------------------------------
/challenges/380-news-board/template.react.md:
--------------------------------------------------------------------------------
1 | ```jsx App.jsx active
2 | export default function App() {
3 | return
News Board
;
4 | }
5 | ```
6 |
--------------------------------------------------------------------------------
/apps/www/features/code-editor/lib/formatFileName.ts:
--------------------------------------------------------------------------------
1 | export const formatFileName = (fileName: string) => {
2 | return fileName.replace(/^\//, "");
3 | };
4 |
--------------------------------------------------------------------------------
/apps/www/next.config.js:
--------------------------------------------------------------------------------
1 | // https://nextjs.org/docs/api-reference/next.config.js/introduction
2 | module.exports = {
3 | reactStrictMode: false,
4 | };
5 |
--------------------------------------------------------------------------------
/apps/www/screens/roadmaps/ui/index.ts:
--------------------------------------------------------------------------------
1 | export { RoadmapsListPage } from "./RoadmapsListPage";
2 | export { RoadmapDetailPage } from "./RoadmapDetailPage";
3 |
--------------------------------------------------------------------------------
/apps/www/app/(default)/roadmaps/page.tsx:
--------------------------------------------------------------------------------
1 | import { RoadmapsListPage } from "~/screens/roadmaps/ui/RoadmapsListPage";
2 |
3 | export default RoadmapsListPage;
4 |
--------------------------------------------------------------------------------
/apps/www/app/(editor)/submit/quiz/page.tsx:
--------------------------------------------------------------------------------
1 | import { SubmitQuizPage } from "~/screens/submit-quiz/ui/SubmitQuizPage";
2 |
3 | export default SubmitQuizPage;
4 |
--------------------------------------------------------------------------------
/apps/www/app/(default)/page.tsx:
--------------------------------------------------------------------------------
1 | import { HomePage } from "~/screens/home/index";
2 |
3 | export const dynamic = "force-static";
4 |
5 | export default HomePage;
6 |
--------------------------------------------------------------------------------
/.lintstagedrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "*.{ts,tsx}": ["eslint --fix --cache"],
3 | "*.js": ["prettier --write --cache"],
4 | "*.{css,json}": ["prettier --write --cache"]
5 | }
6 |
--------------------------------------------------------------------------------
/apps/www/app/(editor)/submit/theory/page.tsx:
--------------------------------------------------------------------------------
1 | import { SubmitTheoryPage } from "~/screens/submit-theory/ui/SubmitTheoryPage";
2 |
3 | export default SubmitTheoryPage;
4 |
--------------------------------------------------------------------------------
/apps/www/entities/category/model/types.ts:
--------------------------------------------------------------------------------
1 | import { CATEGORIES } from "~/entities/category/model/constants";
2 |
3 | export type Category = (typeof CATEGORIES)[number];
4 |
--------------------------------------------------------------------------------
/apps/www/app/(editor)/submit/question/page.tsx:
--------------------------------------------------------------------------------
1 | import { SubmitQuestionPage } from "~/screens/submit-question/ui/SubmitQuestionPage";
2 |
3 | export default SubmitQuestionPage;
4 |
--------------------------------------------------------------------------------
/apps/www/app/(default)/challenges/page.tsx:
--------------------------------------------------------------------------------
1 | export const dynamic = "force-static";
2 |
3 | import { ChallengesPage } from "~/screens/challenges/ui";
4 |
5 | export default ChallengesPage;
6 |
--------------------------------------------------------------------------------
/apps/www/components/ui/aspect-ratio.tsx:
--------------------------------------------------------------------------------
1 | import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
2 |
3 | const AspectRatio = AspectRatioPrimitive.Root;
4 |
5 | export { AspectRatio };
6 |
--------------------------------------------------------------------------------
/apps/www/entities/resource/lib/faviconUtils.ts:
--------------------------------------------------------------------------------
1 | export function getFaviconUrl(domain: string, size: number = 32): string {
2 | return `https://www.google.com/s2/favicons?domain=${domain}&sz=${size}`;
3 | }
4 |
--------------------------------------------------------------------------------
/apps/www/entities/challenge/model/templates/common.ts:
--------------------------------------------------------------------------------
1 | export const commonFiles = {
2 | "/styles.css": {
3 | code: `body {
4 | font-family: sans-serif;
5 | }
6 |
7 | h1 {
8 | font-size: 1.5rem;
9 | }`,
10 | },
11 | };
12 |
--------------------------------------------------------------------------------
/apps/www/entities/completions/api/getCompletions.ts:
--------------------------------------------------------------------------------
1 | import { supabase } from "~/shared/api/supabase/client";
2 |
3 | export async function getCompletions({ user_id }) {
4 | return supabase.from("completions").select("*").eq("user_id", user_id);
5 | }
6 |
--------------------------------------------------------------------------------
/apps/www/shared/lib/string/escapeHtml.ts:
--------------------------------------------------------------------------------
1 | export function escapeHtml(unsafe: string) {
2 | return unsafe
3 | .replace(/&/g, "&")
4 | .replace(//g, ">")
6 | .replace(/"/g, """)
7 | .replace(/'/g, "'");
8 | }
9 |
--------------------------------------------------------------------------------
/challenges/40-layout-1/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Layout 1
3 | template: vanilla
4 | tags: css, layout
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: "2024-03-16"
10 |
--------------------------------------------------------------------------------
/challenges/6-debounce/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: hard
2 | title: Debounce
3 | template: tests
4 | tags: javascript, closure
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: 2024-01-14
10 |
--------------------------------------------------------------------------------
/apps/www/entities/blog/index.ts:
--------------------------------------------------------------------------------
1 | // API layer exports
2 | export { getAllBlogs, getBlogBySlug } from "./api";
3 |
4 | // Model layer exports
5 | export type { Blog, BlogListProps, BlogDetailProps } from "./model";
6 |
7 | // UI layer exports
8 | export { BlogList, BlogDetail } from "./ui";
9 |
--------------------------------------------------------------------------------
/apps/www/entities/challenge/lib/cleanUpReadme.ts:
--------------------------------------------------------------------------------
1 | export function cleanUpReadme(text: string) {
2 | return text
3 | .replace(/[\s\S]*/, "")
4 | .replace(/[\s\S]*/, "")
5 | .trim();
6 | }
7 |
--------------------------------------------------------------------------------
/challenges/10-classnames/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: classNames
3 | template: javascript
4 | tags: javascript
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: "2024-02-21"
10 |
--------------------------------------------------------------------------------
/challenges/13-isempty/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: IsEmpty
3 | template: javascript
4 | tags: javascript, lodash
5 | author:
6 | github: albinAppsmith
7 | name: Albin
8 | avatar_url: https://avatars.githubusercontent.com/u/87797149?v=4
9 | published_date: "2024-02-21"
10 |
--------------------------------------------------------------------------------
/challenges/35-promise-all/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: hard
2 | title: Promise.all
3 | template: javascript
4 | tags: javascript
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: "2024-03-15"
10 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "printWidth": 120,
3 | "tabWidth": 2,
4 | "useTabs": false,
5 | "semi": true,
6 | "singleQuote": false,
7 | "trailingComma": "all",
8 | "arrowParens": "always",
9 | "plugins": ["prettier-plugin-tailwindcss"],
10 | "tailwindFunctions": ["clsx"]
11 | }
12 |
--------------------------------------------------------------------------------
/apps/www/entities/completions/api/deleteCompletions.ts:
--------------------------------------------------------------------------------
1 | import { supabase } from "~/shared/api/supabase/client";
2 |
3 | export async function deleteCompletion({ challenge_id, user_id }) {
4 | return supabase.from("completions").delete().eq("challenge_id", challenge_id).eq("user_id", user_id);
5 | }
6 |
--------------------------------------------------------------------------------
/challenges/141-range/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: range
3 | type: question
4 | template: typescript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-08-08"
11 |
--------------------------------------------------------------------------------
/challenges/145-minby/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: minBy
3 | type: question
4 | template: typescript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-08-09"
11 |
--------------------------------------------------------------------------------
/challenges/174-re-render-3/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: re-render 3
3 | type: question
4 | template: react
5 | tags: react
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-09-18"
11 |
--------------------------------------------------------------------------------
/challenges/18-flatten/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: flatten
3 | template: javascript
4 | tags: javascript, utility, lodash
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: "2024-02-28"
10 |
--------------------------------------------------------------------------------
/challenges/20-throttle/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: hard
2 | title: throttle
3 | template: javascript
4 | tags: utility, lodash, javascript
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: "2024-02-28"
10 |
--------------------------------------------------------------------------------
/challenges/32-instanceofclass/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: InstanceOfClass
3 | template: javascript
4 | tags: javascript
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: "2024-03-12"
10 |
--------------------------------------------------------------------------------
/challenges/364-remounting/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Remounting
3 | type: question
4 | template: react
5 | tags: react
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2025-08-17"
11 |
--------------------------------------------------------------------------------
/challenges/372-re-render-5/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: re-render 5
3 | type: question
4 | template: react
5 | tags: react
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2025-08-17"
11 |
--------------------------------------------------------------------------------
/challenges/378-usedebounce/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: useDebounce
3 | type: question
4 | template: react
5 | tags: react
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2025-08-17"
11 |
--------------------------------------------------------------------------------
/challenges/380-news-board/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: News Board
3 | type: question
4 | template: react
5 | tags: react
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2025-08-17"
11 |
--------------------------------------------------------------------------------
/challenges/385-usereducer/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: useReducer
3 | type: question
4 | template: react
5 | tags: react
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2025-08-18"
11 |
--------------------------------------------------------------------------------
/challenges/47-checkbox/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Checkbox
3 | template: vanilla
4 | tags: css, design-system, html
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: "2024-03-26"
10 |
--------------------------------------------------------------------------------
/challenges/5-fluid-typography/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Fluid Typography
3 | template: vanilla
4 | tags: css, typography
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: 2024-01-10
10 |
--------------------------------------------------------------------------------
/apps/www/shared/api/supabase/client.ts:
--------------------------------------------------------------------------------
1 | import { createBrowserClient } from "@supabase/ssr";
2 |
3 | export function createClient() {
4 | return createBrowserClient(process.env.NEXT_PUBLIC_SUPABASE_URL!, process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!);
5 | }
6 |
7 | export const supabase = createClient();
8 |
--------------------------------------------------------------------------------
/apps/www/shared/lib/i18n/getFileNameByLocale.ts:
--------------------------------------------------------------------------------
1 | import { DEFAULT_LOCALE } from "~/shared/config/locale";
2 |
3 | export function getFileNameByLocale(name: string, locale: string, ext: string) {
4 | if (locale === DEFAULT_LOCALE) return `${name}.${ext}`;
5 |
6 | return `${name}.${locale}.${ext}`;
7 | }
8 |
--------------------------------------------------------------------------------
/challenges/368-re-render-4/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: re-render 4
3 | type: question
4 | template: react-ts
5 | tags: react
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2025-08-17"
11 |
--------------------------------------------------------------------------------
/challenges/37-promise-race/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: hard
2 | title: Promise.race
3 | template: javascript
4 | tags: javascript
5 | author:
6 | github: ashutoshbarthwal
7 | name: Ashutosh Barthwal
8 | avatar_url: https://avatars.githubusercontent.com/u/31532772?v=4
9 | published_date: "2024-03-15"
10 |
--------------------------------------------------------------------------------
/challenges/43-promise-any/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: hard
2 | title: Promise.any
3 | template: javascript
4 | tags: javascript, promise
5 | author:
6 | github: nitish8899
7 | name: Nitish Rajput
8 | avatar_url: https://avatars.githubusercontent.com/u/161798180?v=4
9 | published_date: "2024-03-18"
10 |
--------------------------------------------------------------------------------
/challenges/446-get/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Get
3 | type: question
4 | template: typescript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-16'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/449-curry/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Curry
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-17'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/471-pipe/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Pipe
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-27'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/515-race/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: race()
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-28'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/16-re-render/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: re-render
3 | type: question
4 | template: react
5 | tags: react, performance
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-09-08"
11 |
--------------------------------------------------------------------------------
/challenges/366-reconcilation-2/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Reconcilation 2
3 | type: question
4 | template: react
5 | tags: react
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2025-08-17"
11 |
--------------------------------------------------------------------------------
/challenges/374-stale-callback/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Stale Callback
3 | type: question
4 | template: react
5 | tags: react
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2025-08-17"
11 |
--------------------------------------------------------------------------------
/challenges/376-stale-refs/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Stale Refs
3 | type: question
4 | template: react
5 | tags: react, ui-coding
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2025-08-17"
11 |
--------------------------------------------------------------------------------
/challenges/49-holy-grail/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Holy Grail
3 | type: question
4 | template: vanilla
5 | tags: css, layout
6 | author:
7 | github: nitish8899
8 | name: Nitish Rajput
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-04-15"
11 |
--------------------------------------------------------------------------------
/challenges/526-useprevious/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: usePrevious
3 | type: question
4 | template: react
5 | tags: react
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-30'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/528-react-memo-and-children/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: React.memo and children
3 | type: quiz
4 | tags: react
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: '2025-10-02'
10 |
11 |
--------------------------------------------------------------------------------
/challenges/55-memo/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: memo
3 | type: question
4 | template: javascript
5 | tags: javascript, performance
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-04-27"
11 |
--------------------------------------------------------------------------------
/apps/www/entities/completions/api/createCompletions.ts:
--------------------------------------------------------------------------------
1 | import { supabase } from "~/shared/api/supabase/client";
2 |
3 | export async function createCompletion({ challenge_id, user_id }) {
4 | return supabase.from("completions").insert({
5 | challenge_id: challenge_id,
6 | user_id: user_id,
7 | });
8 | }
9 |
--------------------------------------------------------------------------------
/challenges/360-reconcilation-bug/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Reconcilation Bug
3 | type: question
4 | template: react
5 | tags: react
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2025-08-16"
11 |
--------------------------------------------------------------------------------
/challenges/405-sampling/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Sampling
3 | type: question
4 | template: typescript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-05'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/409-maplimit/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: mapLimit
3 | type: question
4 | template: typescript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-05'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/480-jquery-css/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: jQuery.css
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-27'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/496-json-parse/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: hard
2 | title: JSON.parse
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-27'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/511-sequence/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: sequence()
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-27'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/513-parallel/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: parallel()
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-28'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/520-todo-list/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Todo List
3 | type: question
4 | template: react
5 | tags: ui-coding, react
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-30'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/531-stopwatch/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Stopwatch
3 | type: question
4 | template: react
5 | tags: react, ui-coding
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-10-03'
11 |
12 |
--------------------------------------------------------------------------------
/apps/www/components/ui/skeleton.tsx:
--------------------------------------------------------------------------------
1 | import { cn } from "../../utils/helpers";
2 |
3 | function Skeleton({ className, ...props }: React.HTMLAttributes) {
4 | return ;
5 | }
6 |
7 | export { Skeleton };
8 |
--------------------------------------------------------------------------------
/challenges/399-tic-tac-toe/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Tic Tac Toe
3 | type: question
4 | template: react
5 | tags: react, ui-coding
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-08-28'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/442-deep-clone/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Deep Clone
3 | type: question
4 | template: typescript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-16'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/520-todo-list/template.react.md:
--------------------------------------------------------------------------------
1 |
2 | ```jsx App.jsx active
3 | import { TodoList } from "./TodoList";
4 |
5 | export default function App() {
6 | return ;
7 | }
8 |
9 | ```
10 |
11 | ```jsx TodoList.jsx
12 | export function TodoList() {
13 | return MyTodoList
;
14 | }
15 | ```
--------------------------------------------------------------------------------
/challenges/86-chunk/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Chunk
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-06-18"
11 | discussionNo: 88
12 |
--------------------------------------------------------------------------------
/challenges/91-stack/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Stack
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-06-24"
11 | discussionNo: 93
12 |
--------------------------------------------------------------------------------
/challenges/95-queue/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Queue
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-06-26"
11 | discussionNo: 97
12 |
--------------------------------------------------------------------------------
/apps/www/features/code-editor/lib/enableEmmet.ts:
--------------------------------------------------------------------------------
1 | import { Monaco } from "@monaco-editor/react";
2 | import { emmetHTML, emmetCSS } from "emmet-monaco-es";
3 |
4 | export function enableEmmet(monaco: Monaco): void {
5 | emmetHTML(monaco);
6 | emmetCSS(monaco);
7 | // emmetJSX(monaco, ["javascript", "typescript"]);
8 | }
9 |
--------------------------------------------------------------------------------
/challenges/148-clamp/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: clamp
3 | type: question
4 | template: typescript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-08-09"
11 | discussionNo: 150
12 |
--------------------------------------------------------------------------------
/challenges/152-wait/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: wait
3 | type: question
4 | template: typescript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-08-09"
11 | discussionNo: 154
12 |
--------------------------------------------------------------------------------
/challenges/161-reject/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: reject
3 | type: question
4 | template: typescript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-08-12"
11 | discussionNo: 163
12 |
--------------------------------------------------------------------------------
/challenges/188-two-sums/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Two Sums
3 | type: question
4 | template: typescript
5 | tags: blind 75
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-10-13"
11 | discussionNo: 190
12 |
--------------------------------------------------------------------------------
/challenges/271-clone-graph/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Clone Graph
3 | type: question
4 | template: typescript
5 | tags: blind75, graph, dfs
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/321-rotate-matrix/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Rotate Matrix
3 | type: question
4 | template: typescript
5 | tags: blind75, matrix
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/323-spiral-matrix/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Spiral Matrix
3 | type: question
4 | template: typescript
5 | tags: blind75, matrix
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/465-decode-message/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Decode Message
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-22'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/491-json-stringify/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: JSON.stringify
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-27'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/501-priority-queue/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Priority Queue
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-27'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/58-event-emitter/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Event Emitter
3 | type: question
4 | template: javascript
5 | tags: javascript, events
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-05-14"
11 |
--------------------------------------------------------------------------------
/challenges/158-shuffle/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: shuffle
3 | type: question
4 | template: typescript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-08-10"
11 | discussionNo: 160
12 |
--------------------------------------------------------------------------------
/challenges/277-valid-tree/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Valid Tree
3 | type: question
4 | template: typescript
5 | tags: blind75, graph, union-find
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/295-coin-change/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Coin Change
3 | type: question
4 | template: typescript
5 | tags: blind75, dynamic-programming
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/313-merge-intervals/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Merge Intervals
3 | type: question
4 | template: typescript
5 | tags: blind75, intervals
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/317-meeting-schedule/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Meeting Schedule
3 | type: question
4 | template: typescript
5 | tags: blind75, intervals
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/331-reverse-bits/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Reverse Bits
3 | type: question
4 | template: typescript
5 | tags: blind75, bit-manipulation
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/439-snake-to-camelcase/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Snake to CamelCase
3 | type: question
4 | template: typescript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-16'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/468-first-bad-version/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: First Bad Version
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-27'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/489-detect-data-type/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Detect Data Type
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-27'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/509-clearalltimeout/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: clearAllTimeout()
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-27'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/109-jest-spyon/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: jest.spyOn
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-07-08"
11 | discussionNo: 111
12 |
--------------------------------------------------------------------------------
/challenges/169-re-render-2/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: re-render 2
3 | type: question
4 | template: react
5 | tags: react,performance
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-09-08"
11 | discussionNo: 171
12 |
--------------------------------------------------------------------------------
/challenges/183-anagrams/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Anagrams
3 | type: question
4 | template: typescript
5 | tags: arrays,blind75
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-10-13"
11 | discussionNo: 185
12 |
--------------------------------------------------------------------------------
/challenges/197-string-encode-and-decode/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: String encode and decode
3 | type: question
4 | template: typescript
5 | tags: blind75
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-01"
11 |
--------------------------------------------------------------------------------
/challenges/203-is-palindrome/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Is Palindrome
3 | type: question
4 | template: typescript
5 | tags: blind75, string, two-pointers
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-01"
11 |
--------------------------------------------------------------------------------
/challenges/285-house-robber/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: House Robber
3 | type: question
4 | template: typescript
5 | tags: blind75, dynamic-programming
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/3-use-hover/info.yml:
--------------------------------------------------------------------------------
1 | title: useHover
2 |
3 | author:
4 | name: Pawan Kumar
5 | email: pawankumar2901@gmail.com
6 | github: jsartisan
7 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
8 |
9 | tags: react, event listeners, hooks
10 |
11 | difficulty: hard
12 | published_date: "2024-02-21"
13 |
--------------------------------------------------------------------------------
/challenges/325-set-zeroes-in-matrix/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Set Zeroes in Matrix
3 | type: question
4 | template: typescript
5 | tags: blind75, matrix
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/340-escape-the-overflow-hidden/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Escape the overflow hidden
3 | type: question
4 | template: static
5 | tags: css
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-11"
11 |
--------------------------------------------------------------------------------
/challenges/4-use-focus-trap/info.yml:
--------------------------------------------------------------------------------
1 | title: useFocusTrap
2 |
3 | author:
4 | name: Pawan Kumar
5 | email: pawankumar2901@gmail.com
6 | github: jsartisan
7 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
8 |
9 | tags: react, event listeners, hooks
10 |
11 | category: react
12 |
13 | difficulty: hard
14 |
--------------------------------------------------------------------------------
/challenges/420-promise-finally/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Promise.finally
3 | type: question
4 | template: javascript
5 | tags: javascript, promises
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-05'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/474-immutability-helper/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Immutability Helper
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-27'
11 |
12 |
--------------------------------------------------------------------------------
/apps/www/app/(editor)/layout.tsx:
--------------------------------------------------------------------------------
1 | import { PropsWithChildren } from "react";
2 |
3 | import { Header } from "~/widgets/Header";
4 |
5 | export default function Layout(props: PropsWithChildren) {
6 | const { children } = props;
7 |
8 | return (
9 | <>
10 |
11 | {children}
12 | >
13 | );
14 | }
15 |
--------------------------------------------------------------------------------
/challenges/117-composibility/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Composibility
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-07-25"
11 | discussionNo: 127
12 |
--------------------------------------------------------------------------------
/challenges/191-anagram-groups/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Anagram Groups
3 | type: question
4 | template: typescript
5 | tags: blind75
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-10-17"
11 | discussionNo: 193
12 |
--------------------------------------------------------------------------------
/challenges/217-validate-parentheses/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Validate Parentheses
3 | type: question
4 | template: typescript
5 | tags: blind75, string, stack
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/223-reverse-a-linked-list/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Reverse a Linked List
3 | type: question
4 | template: typescript
5 | tags: blind75, linked-list
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/227-reorder-linked-list/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Reorder Linked List
3 | type: question
4 | template: typescript
5 | tags: blind75, linked-list
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/261-search-for-word/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Search for Word
3 | type: question
4 | template: typescript
5 | tags: blind75, backtracking, matrix
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/283-climbing-stairs/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Climbing Stairs
3 | type: question
4 | template: typescript
5 | tags: blind75, dynamic-programming
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/287-house-robber-ii/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: House Robber II
3 | type: question
4 | template: typescript
5 | tags: blind75, dynamic-programming
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/293-decode-ways/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Decode Ways
3 | type: question
4 | template: typescript
5 | tags: blind75, dynamic-programming, string
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/299-word-break/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Word Break
3 | type: question
4 | template: typescript
5 | tags: blind75, dynamic-programming, string
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/303-count-paths/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Count Paths
3 | type: question
4 | template: typescript
5 | tags: blind75, dynamic-programming, matrix
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/311-insert-new-interval/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Insert New Interval
3 | type: question
4 | template: typescript
5 | tags: blind75, intervals
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/327-number-of-one-bits/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Number of One Bits
3 | type: question
4 | template: typescript
5 | tags: blind75, bit-manipulation
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/333-missing-number/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Missing Number
3 | type: question
4 | template: typescript
5 | tags: blind75, bit-manipulation, math
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/418-dom-to-object/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: DOM to Object
3 | type: question
4 | template: javascript
5 | tags: javascript, dom, parsing
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-05'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/430-custom-promise/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: hard
2 | title: Custom Promise
3 | type: question
4 | template: typescript
5 | tags: typescript, promises, async
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-06'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/455-curry-with-placeholder/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Curry with Placeholder
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-21'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/99-closure-2/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Closure 2
3 | type: question
4 | template: javascript
5 | tags: javascript, closure
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-07-01"
11 | discussionNo: 101
12 |
--------------------------------------------------------------------------------
/challenges/104-queue-using-stack/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Queue using Stack
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-07-02"
11 | discussionNo: 108
12 |
--------------------------------------------------------------------------------
/challenges/115-foreach-and-this/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: forEach and this
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-07-25"
11 | discussionNo: 120
12 |
--------------------------------------------------------------------------------
/challenges/179-contains-duplicate/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Contains Duplicate
3 | type: question
4 | template: typescript
5 | tags: blind75
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-10-13"
11 | discussionNo: 181
12 |
--------------------------------------------------------------------------------
/challenges/205-three-integer-sum/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Three Integer Sum
3 | type: question
4 | template: typescript
5 | tags: blind75, array, two-pointers
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-01"
11 |
--------------------------------------------------------------------------------
/challenges/239-same-binary-tree/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Same Binary Tree
3 | type: question
4 | template: typescript
5 | tags: blind75, binary-tree, recursion
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/275-course-schedule/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Course Schedule
3 | type: question
4 | template: typescript
5 | tags: blind75, graph, topological-sort
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/309-jump-game/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Jump Game
3 | type: question
4 | template: typescript
5 | tags: blind75, dynamic-programming, array, greedy
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/319-meeting-schedule-ii/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Meeting Schedule II
3 | type: question
4 | template: typescript
5 | tags: blind75, intervals, greedy
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/335-sum-of-two-integers/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Sum of Two Integers
3 | type: question
4 | template: typescript
5 | tags: blind75, bit-manipulation
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/383-can-you-describe-the-reconciliation-process/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Can you describe the reconciliation process?
3 | type: theory
4 | tags: react
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: "2025-08-18"
10 |
--------------------------------------------------------------------------------
/challenges/407-file-explorer/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: hard
2 | title: File Explorer
3 | type: question
4 | template: react
5 | tags: react, state-management, nested-data
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-05'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/415-test-and-expect/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: test and expect
3 | type: question
4 | template: javascript
5 | tags: javascript, testing, jest
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-05'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/207-max-water-container/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Max Water Container
3 | type: question
4 | template: typescript
5 | tags: blind75, array, two-pointers
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-01"
11 |
--------------------------------------------------------------------------------
/challenges/235-invert-a-binary-tree/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Invert a Binary Tree
3 | type: question
4 | template: typescript
5 | tags: blind75, binary-tree, recursion
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/237-depth-of-binary-tree/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Depth of Binary Tree
3 | type: question
4 | template: typescript
5 | tags: blind75, binary-tree, recursion
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/267-search-for-word-ii/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: hard
2 | title: Search for Word II
3 | type: question
4 | template: typescript
5 | tags: blind75, trie, backtracking, matrix
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/269-count-number-of-islands/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Count Number of Islands
3 | type: question
4 | template: typescript
5 | tags: blind75, matrix, dfs
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/281-foreign-dictionary/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: hard
2 | title: Foreign Dictionary
3 | type: question
4 | template: typescript
5 | tags: blind75, graph, topological-sort
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/307-maximum-subarray/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Maximum Subarray
3 | type: question
4 | template: typescript
5 | tags: blind75, dynamic-programming, array
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/329-counting-bits/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Counting Bits
3 | type: question
4 | template: typescript
5 | tags: blind75, bit-manipulation, dynamic-programming
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/413-html-string-encoder/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: hard
2 | title: Html string encoder
3 | type: question
4 | template: typescript
5 | tags: javascript, string, parsing
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-05'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/78-array-prototype-map/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Array.prototype.map
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-06-17"
11 | discussionNo: 80
12 |
--------------------------------------------------------------------------------
/challenges/273-pacific-atlantic-water-flow/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Pacific Atlantic Water Flow
3 | type: question
4 | template: typescript
5 | tags: blind75, matrix, dfs
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/424-promise-allsettled/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Promise.allSettled
3 | type: question
4 | template: javascript
5 | tags: javascript, promises, polyfill
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-05'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/503-reorder-array-with-new-indexes/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Reorder Array with New Indexes
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-27'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/533-trapping-rain-water/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: hard
2 | title: Trapping Rain Water
3 | type: question
4 | template: javascript
5 | tags: javascript, arrays, two-pointers
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-10-07'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/74-array-prototype-filter/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Array.prototype.filter
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-06-17"
11 | discussionNo: 76
12 |
--------------------------------------------------------------------------------
/challenges/82-array-prototype-reduce/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Array.prototype.reduce
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-06-18"
11 | discussionNo: 84
12 |
--------------------------------------------------------------------------------
/challenges/194-top-k-frequent-elements/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Top K Frequent Elements
3 | type: question
4 | template: typescript
5 | tags: blind 75
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-01"
11 | discussionNo: 196
12 |
--------------------------------------------------------------------------------
/challenges/199-products-of-array-excluding-self/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Products of Array Excluding Self
3 | type: question
4 | template: typescript
5 | tags: blind75, array
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-01"
11 |
--------------------------------------------------------------------------------
/challenges/201-longest-consecutive-sequence/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Longest Consecutive Sequence
3 | type: question
4 | template: typescript
5 | tags: blind75, array, hash-set
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-01"
11 |
--------------------------------------------------------------------------------
/challenges/225-merge-two-sorted-linked-lists/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Merge Two Sorted Linked Lists
3 | type: question
4 | template: typescript
5 | tags: blind75, linked-list
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/241-subtree-of-a-binary-tree/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Subtree of a Binary Tree
3 | type: question
4 | template: typescript
5 | tags: blind75, binary-tree, recursion
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/257-find-median-in-a-data-stream/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: hard
2 | title: Find Median in a Data Stream
3 | type: question
4 | template: typescript
5 | tags: blind75, heap, data-stream
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/259-combination-target-sum/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Combination Target Sum
3 | type: question
4 | template: typescript
5 | tags: blind75, backtracking, recursion
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/279-count-connected-components/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Count Connected Components
3 | type: question
4 | template: typescript
5 | tags: blind75, graph, union-find
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/291-palindromic-substrings/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Palindromic Substrings
3 | type: question
4 | template: typescript
5 | tags: blind75, dynamic-programming, string
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/315-non-overlapping-intervals/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Non-overlapping Intervals
3 | type: question
4 | template: typescript
5 | tags: blind75, intervals, greedy
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/403-find-highest-commodity-price/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: find-highest-commodity-price
3 | template: javascript
4 | tags: javascript, array, algorithm, search
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: '2025-09-04'
10 |
11 |
--------------------------------------------------------------------------------
/apps/www/entities/challenge/api/index.ts:
--------------------------------------------------------------------------------
1 | export { getChallenges } from "./getChallenges";
2 | export { getChallengeByPathSlim } from "./getChallengeByPathSlim";
3 | export { getChallengeInfoByLocale } from "./getChallengeInfoByLocale";
4 | export { getAllChallengesTags } from "./getAllChallengesTags";
5 | export { getChallengesByTag } from "./getChallengesByTag";
6 |
--------------------------------------------------------------------------------
/challenges/253-binary-tree-maximum-path-sum/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: hard
2 | title: Binary Tree Maximum Path Sum
3 | type: question
4 | template: typescript
5 | tags: blind75, binary-tree, recursion
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/263-implement-prefix-tree-trie/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Implement Prefix Tree (Trie)
3 | type: question
4 | template: typescript
5 | tags: blind75, trie, data-structure
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/297-maximum-product-subarray/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Maximum Product Subarray
3 | type: question
4 | template: typescript
5 | tags: blind75, dynamic-programming, array
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/411-parallel-async-execution/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Parallel async execution
3 | type: question
4 | template: javascript
5 | tags: javascript, async, concurrency
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-05'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/422-execute-promises-in-series/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Execute Promises in Series
3 | type: question
4 | template: javascript
5 | tags: javascript, promises, async
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-05'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/428-retry-promises-n-times/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Retry Promises N Times
3 | type: question
4 | template: typescript
5 | tags: typescript, promises, async, retry
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-06'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/459-debounce-with-leading-and-trailing/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Debounce with Leading & Trailing
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-22'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/231-linked-list-cycle-detection/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Linked List Cycle Detection
3 | type: question
4 | template: typescript
5 | tags: blind75, linked-list, two-pointers
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/247-valid-binary-search-tree/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Valid Binary Search Tree
3 | type: question
4 | template: typescript
5 | tags: blind75, binary-search-tree, recursion
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/305-longest-common-subsequence/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Longest Common Subsequence
3 | type: question
4 | template: typescript
5 | tags: blind75, dynamic-programming, string
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/69-two-functions-one-object/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Two functions - one object
3 | type: question
4 | template: javascript
5 | tags: javascript, objects
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-06-04"
11 | discussionNo: 71
12 |
--------------------------------------------------------------------------------
/apps/www/app/(editor)/challenges/[slug]/page.tsx:
--------------------------------------------------------------------------------
1 | import { ChallengePage, generateMetadata, generateStaticParams } from "~/screens/challenge/ui/ChallengePage";
2 |
3 | export const revalidate = false;
4 | export const dynamicParams = false;
5 | export const dynamic = "force-static";
6 |
7 | export default ChallengePage;
8 | export { generateMetadata, generateStaticParams };
9 |
--------------------------------------------------------------------------------
/apps/www/shared/config/locale.ts:
--------------------------------------------------------------------------------
1 | import * as en from "../../../../locales/en.json";
2 |
3 | export const TRANSLATIONS = {
4 | en,
5 | } as const;
6 |
7 | export const DEFAULT_LOCALE = "en";
8 | export const SUPPORTED_LOCALES = Object.keys(TRANSLATIONS) as (keyof typeof TRANSLATIONS)[];
9 |
10 | export type SupportedLocales = (typeof SUPPORTED_LOCALES)[number];
11 |
--------------------------------------------------------------------------------
/apps/www/shared/config/paths.ts:
--------------------------------------------------------------------------------
1 | export const ROOT_PATH = process.cwd();
2 | export const REPO = "https://github.com/jsartisan/frontend-challenges";
3 | export const REPO_API = "https://api.github.com/repos/jsartisan/frontend-challenges";
4 | export const DOMAIN = process.env.NEXT_BASE_URL || "https://frontend-challenges.com";
5 |
6 | export const CONTENT_PATH = "./content";
7 |
--------------------------------------------------------------------------------
/apps/www/shared/model/store.ts:
--------------------------------------------------------------------------------
1 | import { create } from "zustand";
2 |
3 | type UiStore = {
4 | isLoginModalOpen: boolean;
5 | toggleLoginModal: (shouldOpen: boolean) => void;
6 | };
7 |
8 | export const useUiStore = create((set) => ({
9 | isLoginModalOpen: false,
10 | toggleLoginModal: (shouldOpen) => set({ isLoginModalOpen: shouldOpen }),
11 | }));
12 |
--------------------------------------------------------------------------------
/challenges/209-best-time-to-buy-and-sell-stock/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Best Time to Buy and Sell Stock
3 | type: question
4 | template: typescript
5 | tags: blind75, array, dynamic-programming
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-01"
11 |
--------------------------------------------------------------------------------
/challenges/249-kth-smallest-integer-in-bst/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Kth Smallest Integer in BST
3 | type: question
4 | template: typescript
5 | tags: blind75, binary-search-tree, recursion
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/265-design-word-search-data-structure/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Design Word Search Data Structure
3 | type: question
4 | template: typescript
5 | tags: blind75, trie, data-structure
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/289-longest-palindromic-substring/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Longest Palindromic Substring
3 | type: question
4 | template: typescript
5 | tags: blind75, dynamic-programming, string
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/301-longest-increasing-subsequence/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Longest Increasing Subsequence
3 | type: question
4 | template: typescript
5 | tags: blind75, dynamic-programming, array
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/426-priority-based-promise-executor/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: hard
2 | title: Priority-based Promise Executor
3 | type: question
4 | template: javascript
5 | tags: javascript, promises, async
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-05'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/215-minimum-window-with-characters/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: hard
2 | title: Minimum Window With Characters
3 | type: question
4 | template: typescript
5 | tags: blind75, string, sliding-window, hash-map
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/221-find-target-in-rotated-sorted-array/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Find Target in Rotated Sorted Array
3 | type: question
4 | template: typescript
5 | tags: blind75, array, binary-search
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/233-merge-k-sorted-linked-lists/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: hard
2 | title: Merge K Sorted Linked Lists
3 | type: question
4 | template: typescript
5 | tags: blind75, linked-list, heap, divide-and-conquer
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/245-level-order-traversal-of-binary-tree/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Level Order Traversal of Binary Tree
3 | type: question
4 | template: typescript
5 | tags: blind75, binary-tree, bfs
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/apps/www/features/leaderboard/hooks/useLeaderboard.ts:
--------------------------------------------------------------------------------
1 | import { useQuery } from "@tanstack/react-query";
2 |
3 | import { getLeadboardUsersWithCount } from "~/features/leaderboard/api/getLeadboardUsers";
4 |
5 | export function useLeaderboard() {
6 | return useQuery({
7 | queryKey: ["leaderboard"],
8 | queryFn: () => getLeadboardUsersWithCount(),
9 | });
10 | }
11 |
--------------------------------------------------------------------------------
/challenges/219-find-minimum-in-rotated-sorted-array/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Find Minimum in Rotated Sorted Array
3 | type: question
4 | template: typescript
5 | tags: blind75, array, binary-search
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/229-remove-node-from-end-of-linked-list/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Remove Node From End of Linked List
3 | type: question
4 | template: typescript
5 | tags: blind75, linked-list, two-pointers
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/apps/www/screens/blog/ui/BlogDetailPage.tsx:
--------------------------------------------------------------------------------
1 | import { BlogDetail } from "~/entities/blog/ui";
2 | import { getBlogBySlug } from "~/entities/blog/api";
3 |
4 | async function BlogDetailPage(props: PageProps<"/blog/[slug]">) {
5 | const blog = await getBlogBySlug((await props.params).slug);
6 |
7 | return ;
8 | }
9 |
10 | export { BlogDetailPage };
11 |
--------------------------------------------------------------------------------
/apps/www/scripts/actions/types.ts:
--------------------------------------------------------------------------------
1 | import type IO from "@actions/io";
2 | import type Core from "@actions/core";
3 | import type { context, getOctokit } from "@actions/github";
4 |
5 | export type Context = typeof context;
6 | export type Github = ReturnType;
7 | export type Action = (github: Github, context: Context, core: typeof Core, io: typeof IO) => Promise;
8 |
--------------------------------------------------------------------------------
/challenges/255-serialize-and-deserialize-binary-tree/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: hard
2 | title: Serialize and Deserialize Binary Tree
3 | type: question
4 | template: typescript
5 | tags: blind75, binary-tree, serialization
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/358-closure-3/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Closure 3
3 | type: quiz
4 | tags: javascript
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: "2025-08-15"
10 | options:
11 | - "Pete"
12 | - "John"
13 | - "undefined"
14 | - "Error"
15 | right_answer: "Pete"
16 |
--------------------------------------------------------------------------------
/challenges/432-throttle-with-leading-and-trailing/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Throttle with Leading and Trailing
3 | type: question
4 | template: typescript
5 | tags: javascript, throttle, performance
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-06'
11 |
12 |
--------------------------------------------------------------------------------
/challenges/498-sum-function/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Sum Function
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-27'
11 | resources:
12 | - https://javascript.info/object-toprimitive
13 |
14 |
--------------------------------------------------------------------------------
/challenges/528-react-memo-and-children/README.md:
--------------------------------------------------------------------------------
1 | Consider the following code:
2 |
3 | ```js
4 | const ChildMemo = React.memo(Child);
5 | const Component = () => {
6 | return (
7 |
8 | Some text here
9 |
10 | );
11 | };
12 | ```
13 |
14 | Let's say a state change happens in the `Component`, will `ChildMemo` re-render or not?
15 |
--------------------------------------------------------------------------------
/apps/www/components/ui/collapsible.tsx:
--------------------------------------------------------------------------------
1 | import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
2 |
3 | const Collapsible = CollapsiblePrimitive.Root;
4 |
5 | const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
6 |
7 | const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
8 |
9 | export { Collapsible, CollapsibleTrigger, CollapsibleContent };
10 |
--------------------------------------------------------------------------------
/challenges/213-longest-repeating-substring-with-replacement/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Longest Repeating Substring With Replacement
3 | type: question
4 | template: typescript
5 | tags: blind75, string, sliding-window
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/350-promise-chain-output/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Promise Chain Output
3 | type: quiz
4 | tags: javascript, promises
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: "2024-12-26"
10 | options:
11 | - "6"
12 | - "4"
13 | - "3"
14 | - "2"
15 | right_answer: "6"
16 |
--------------------------------------------------------------------------------
/challenges/389-useeffect/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: useEffect
3 | type: quiz
4 | tags: react
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: '2025-08-19'
10 | options:
11 | - "0 0 1 0"
12 | - "0 1 1 1"
13 | - "0 0 1 1"
14 | - "1 0 1 0"
15 | right_answer: "0 0 1 0"
16 |
17 |
--------------------------------------------------------------------------------
/challenges/45-specificity/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Specificity
3 | tags: css
4 | type: quiz
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: "2024-03-20"
10 | options:
11 | - "purple"
12 | - "red"
13 | - "blue"
14 | - "green"
15 | right_answer: "red"
16 | level: junior
17 |
--------------------------------------------------------------------------------
/apps/www/features/auth/hooks/useAuth.ts:
--------------------------------------------------------------------------------
1 | import { useQuery } from "@tanstack/react-query";
2 |
3 | import { getAuthUser } from "~/features/auth/api/getAuthUser";
4 |
5 | export function useAuth() {
6 | const profileQuery = useQuery({
7 | queryKey: ["user"],
8 | queryFn: getAuthUser,
9 | });
10 |
11 | return { isLoading: profileQuery.isPending, user: profileQuery.data };
12 | }
13 |
--------------------------------------------------------------------------------
/challenges/2-click-outisde/info.yml:
--------------------------------------------------------------------------------
1 | title: useClickOutside
2 | excerpt: Implement a custom hook that listens for clicks outside of a given element.
3 | author:
4 | name: Pawan Kumar
5 | email: pawankumar2901@gmail.com
6 | github: jsartisan
7 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
8 | tags: react, event listeners, hooks
9 | template: react
10 | difficulty: easy
11 |
--------------------------------------------------------------------------------
/challenges/251-binary-tree-from-preorder-and-inorder-traversal/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Binary Tree from Preorder and Inorder Traversal
3 | type: question
4 | template: typescript
5 | tags: blind75, binary-tree, recursion
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/243-lowest-common-ancestor-in-binary-search-tree/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Lowest Common Ancestor in Binary Search Tree
3 | type: question
4 | template: typescript
5 | tags: blind75, binary-search-tree, recursion
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-02"
11 |
--------------------------------------------------------------------------------
/challenges/211-longest-substring-without-repeating-characters/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Longest Substring Without Repeating Characters
3 | type: question
4 | template: typescript
5 | tags: blind75, string, sliding-window, hash-map
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: "2024-11-01"
11 |
--------------------------------------------------------------------------------
/apps/www/app/(editor)/play/page.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import dynamic from "next/dynamic";
4 |
5 | import Loading from "./loading";
6 |
7 | const PlaygroundPage = dynamic(
8 | () => import("~/screens/playground/ui/PlaygroundPage").then((mod) => mod.PlaygroundEditor),
9 | {
10 | loading: Loading,
11 | },
12 | );
13 |
14 | export default function Page() {
15 | return ;
16 | }
17 |
--------------------------------------------------------------------------------
/challenges/348-promise-resolution-order/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Promise Resolution Order
3 | type: quiz
4 | tags: javascript, promises
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: "2024-12-26"
10 | options:
11 | - "1"
12 | - "2"
13 | - "error"
14 | - "1, 2, error"
15 | right_answer: "1"
16 |
--------------------------------------------------------------------------------
/challenges/4-use-focus-trap/template.react.md:
--------------------------------------------------------------------------------
1 | ```js App.jsx
2 | import { useFocusTrap } from "./useFocusTrap";
3 |
4 | function App() {
5 | const focusTrapRef = useFocusTrap();
6 |
7 | return (
8 |
9 |
10 |
11 | );
12 | }
13 |
14 | export default App;
15 | ```
16 |
17 | ```js useFocusTrap.js active
18 | export function useFocusTrap() {}
19 | ```
20 |
--------------------------------------------------------------------------------
/apps/www/components.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://ui.shadcn.com/schema.json",
3 | "style": "new-york",
4 | "rsc": false,
5 | "tsx": true,
6 | "tailwind": {
7 | "config": "tailwind.config.js",
8 | "css": "app/globals.css",
9 | "baseColor": "slate",
10 | "cssVariables": true
11 | },
12 | "aliases": {
13 | "components": "@/components",
14 | "utils": "@/lib/utils"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/challenges/391-useeffect-2/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: useEffect 2
3 | type: quiz
4 | tags: react
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: '2025-08-19'
10 | options:
11 | - "false, false"
12 | - "true, false"
13 | - "false, true"
14 | - "true, true"
15 | right_answer: "false, false"
16 |
17 |
--------------------------------------------------------------------------------
/apps/www/features/code-editor/hooks/useLayout.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import { useContext } from "react";
3 |
4 | import { LayoutContext } from "../context/LayoutProvider";
5 |
6 | export function useLayout() {
7 | const context = useContext(LayoutContext);
8 |
9 | if (context === undefined) {
10 | throw new Error("useLayout must be used within a LayoutProvider");
11 | }
12 |
13 | return context;
14 | }
15 |
--------------------------------------------------------------------------------
/apps/www/app/(default)/categories/[category]/page.tsx:
--------------------------------------------------------------------------------
1 | import { CATEGORIES } from "~/entities/category";
2 | import { CategoryDetailPage } from "~/screens/categories";
3 |
4 | export const revalidate = false;
5 | export const dynamic = "force-static";
6 |
7 | export function generateStaticParams() {
8 | return CATEGORIES.map((category) => ({
9 | category,
10 | }));
11 | }
12 |
13 | export default CategoryDetailPage;
14 |
--------------------------------------------------------------------------------
/challenges/483-node-store/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Node Store
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-27'
11 | resources:
12 | - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/for
13 |
14 |
--------------------------------------------------------------------------------
/apps/www/components/ui/link.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import * as React from "react";
4 | import NextLink from "next/link";
5 |
6 | const Link = React.forwardRef, React.ComponentPropsWithoutRef>(
7 | ({ prefetch, ...props }, ref) => ,
8 | );
9 |
10 | Link.displayName = "Link";
11 |
12 | export { Link };
13 |
--------------------------------------------------------------------------------
/apps/www/entities/category/index.ts:
--------------------------------------------------------------------------------
1 | // API layer exports
2 | export { getChallengesByCategory, filterChallengesByCategory } from "./api";
3 |
4 | // Model layer exports
5 | export type { Category } from "./model";
6 | export { CATEGORIES } from "./model";
7 |
8 | // UI layer exports
9 | export { CategoryList } from "./ui";
10 |
11 | // Lib layer exports
12 | export { mapCategoriesWithCount } from "./lib/mapCategoriesWithCount";
13 |
--------------------------------------------------------------------------------
/apps/www/shared/lib/i18n/translate.ts:
--------------------------------------------------------------------------------
1 | import { DEFAULT_LOCALE, TRANSLATIONS, type SupportedLocales } from "~/shared/config/locale";
2 |
3 | export function translate(locale: SupportedLocales, key: string): string {
4 | const result = (TRANSLATIONS[locale] && TRANSLATIONS[locale][key]) || TRANSLATIONS[DEFAULT_LOCALE][key];
5 |
6 | if (!result) throw new Error(`Missing message for key "${key}"`);
7 |
8 | return result;
9 | }
10 |
--------------------------------------------------------------------------------
/apps/www/features/code-editor/hooks/useSandpackLocal.ts:
--------------------------------------------------------------------------------
1 | import { useContext } from "react";
2 |
3 | import { SandpackLocalContext } from "../context/SandpackLocalProvider";
4 |
5 | export const useSandpackLocal = () => {
6 | const context = useContext(SandpackLocalContext);
7 |
8 | if (!context) {
9 | throw new Error("useSandpackLocal must be used within a SandpackLocalProvider");
10 | }
11 |
12 | return context;
13 | };
14 |
--------------------------------------------------------------------------------
/challenges/113-losing-this/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Losing this
3 | type: quiz
4 | tags: javascript
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: "2024-07-17"
10 | options:
11 | - "Hello, John!"
12 | - "Hello, undefined!"
13 | - "Hello, user!"
14 | - "Error: Cannot read property"
15 | right_answer: "Hello, undefined!"
16 |
--------------------------------------------------------------------------------
/challenges/434-multi-stepper-component/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: Multi-Stepper Component
3 | type: question
4 | template: react-ts
5 | tags: react, typescript, components, ui-coding
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-06'
11 | resources:
12 | - https://react.dev/reference/react/useImperativeHandle
13 |
14 |
--------------------------------------------------------------------------------
/apps/www/entities/category/lib/mapCategoriesWithCount.ts:
--------------------------------------------------------------------------------
1 | import { ChallengeList } from "~/entities/challenge/model/types";
2 | import { CATEGORIES } from "~/entities/category/model/constants";
3 |
4 | export function mapCategoriesWithCount(challenges: ChallengeList) {
5 | return CATEGORIES.map((category) => ({
6 | name: category,
7 | challengesCount: challenges.filter((challenge) => challenge.category === category).length,
8 | }));
9 | }
10 |
--------------------------------------------------------------------------------
/apps/www/utils/helpers.ts:
--------------------------------------------------------------------------------
1 | import { twMerge } from "tailwind-merge";
2 | import { type ClassValue, clsx } from "clsx";
3 | import { Children, isValidElement } from "react";
4 |
5 | export function cn(...inputs: ClassValue[]) {
6 | return twMerge(clsx(inputs));
7 | }
8 |
9 | export function getValidChildren(children: React.ReactNode) {
10 | return Children.toArray(children).filter((child) => isValidElement(child)) as React.ReactElement[];
11 | }
12 |
--------------------------------------------------------------------------------
/challenges/395-react-useeffect-micro-macro-tasks/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: useEffect + Macro/Micro Tasks
3 | type: quiz
4 | tags: react
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: '2025-08-19'
10 | options:
11 | - "1, 3, 4, 2"
12 | - "1, 2, 3, 4"
13 | - "1, 3, 2, 4"
14 | - "1, 4, 3, 2"
15 | right_answer: "1, 3, 4, 2"
16 |
17 |
--------------------------------------------------------------------------------
/apps/www/screens/roadmaps/ui/RoadmapDetailPage.tsx:
--------------------------------------------------------------------------------
1 | import { RoadmapDetail } from "~/entities/roadmap/ui";
2 | import { getRoadmapByPath } from "~/entities/roadmap/api";
3 |
4 | async function RoadmapDetailPage(props: PageProps<"/challenges/[slug]">) {
5 | const slug = (await props.params).slug;
6 |
7 | const roadmap = await getRoadmapByPath(slug);
8 |
9 | return ;
10 | }
11 |
12 | export { RoadmapDetailPage };
13 |
--------------------------------------------------------------------------------
/apps/www/entities/comment/model/types.ts:
--------------------------------------------------------------------------------
1 | export type Comment = {
2 | id: number;
3 | body: string;
4 | created_at: string;
5 | updated_at: string;
6 | user: {
7 | login: string;
8 | avatar_url: string;
9 | };
10 | reactions: {
11 | "+1": number;
12 | "-1": number;
13 | laugh: number;
14 | hooray: number;
15 | confused: number;
16 | heart: number;
17 | rocket: number;
18 | eyes: number;
19 | };
20 | };
21 |
--------------------------------------------------------------------------------
/apps/www/shared/context/ThemeProvider.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import * as React from "react";
4 | import { type ThemeProviderProps } from "next-themes/dist/types";
5 | import { ThemeProvider as NextThemesProvider } from "next-themes";
6 |
7 | export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
8 | return (
9 |
10 | {children}
11 |
12 | );
13 | }
14 |
--------------------------------------------------------------------------------
/challenges/3-use-hover/template.react.md:
--------------------------------------------------------------------------------
1 | ```js App.jsx
2 | import { useHover } from "./useHover";
3 |
4 | function App() {
5 | const { hovered, ref } = useHover();
6 |
7 | return {hovered ? "I am hovered" : "Put mouse over me please"}
;
8 | }
9 |
10 | export default App;
11 | ```
12 |
13 | ```js useHover.js active
14 | import { useCallback, useEffect, useRef, useState } from "react";
15 |
16 | export function useHover() {}
17 | ```
18 |
--------------------------------------------------------------------------------
/challenges/8-closure/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Closure
3 | tags: closure, javascript
4 | author:
5 | github: jsartisan
6 | name: Pawan Kumar
7 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
8 | published_date: "2024-02-18"
9 | type: quiz
10 | options:
11 | - "3 3 3 and 0 1 2"
12 | - "0 1 2 and 3 3 3"
13 | - "3 3 3 and 3 3 3"
14 | - "0 1 2 and 0 1 2"
15 | right_answer: "3 3 3 and 0 1 2"
16 | level: junior, mid-level
17 |
--------------------------------------------------------------------------------
/challenges/121-f-prototype/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: F.prototype
3 | type: quiz
4 | tags: javascript
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: "2024-07-27"
10 | discussionNo: 125
11 | options:
12 | - "true, true, false"
13 | - "true, false, false"
14 | - "false, true, false"
15 | - "true, true, true"
16 | right_answer: "true, true, false"
17 |
--------------------------------------------------------------------------------
/apps/www/entities/challenge/api/getChallengesByTag.ts:
--------------------------------------------------------------------------------
1 | import type { ChallengeList } from "~/entities/challenge/model/types";
2 |
3 | import { getChallengeInfoByLocale } from "./getChallengeInfoByLocale";
4 |
5 | export function getChallengesByTag(challenges: ChallengeList, locale: string, tag: string) {
6 | return challenges.filter((quiz) => {
7 | const info = getChallengeInfoByLocale(quiz, locale);
8 |
9 | return !!info.tags?.includes(tag);
10 | });
11 | }
12 |
--------------------------------------------------------------------------------
/challenges/531-stopwatch/template.react.md:
--------------------------------------------------------------------------------
1 | ```jsx App.jsx
2 | import { Stopwatch } from "./Stopwatch";
3 |
4 | export default function App() {
5 | return
6 | }
7 |
8 | ```
9 |
10 | ```jsx Stopwatch.jsx active
11 | export function Stopwatch() {
12 | return (
13 |
14 |
0s 00ms
15 |
16 |
17 |
18 |
19 | );
20 | }
21 |
22 | ```
23 |
24 |
25 |
--------------------------------------------------------------------------------
/challenges/376-stale-refs/template.react.md:
--------------------------------------------------------------------------------
1 | ```jsx App.jsx active
2 | import { useState, useRef } from "react";
3 |
4 | export default function App() {
5 | const [value, setValue] = useState();
6 |
7 | const ref = useRef(() => {
8 | console.log("Submitted value:" + value);
9 | });
10 |
11 | return (
12 | <>
13 | setValue(e.target.value)} />
14 |
15 | >
16 | );
17 | }
18 | ```
19 |
--------------------------------------------------------------------------------
/challenges/401-usestate/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: useState
3 | type: quiz
4 | tags: react
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: '2025-08-29'
10 | resources:
11 | - https://react.dev/learn/state-as-a-snapshot
12 | options:
13 | - "0 2 4 6 8..."
14 | - "0 1 2 3 4..."
15 | - "0 3 6 9 12..."
16 | right_answer: "0 2 4 6 8..."
17 | level: junior,mid-level
18 |
19 |
--------------------------------------------------------------------------------
/challenges/66-this/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: this
3 | type: quiz
4 | tags: javascript, objects
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: "2024-06-03"
10 | discussionNo: 68
11 | options:
12 | - "John Doe"
13 | - "undefined"
14 | - "Error: Cannot read property 'name' of undefined"
15 | - "null"
16 | right_answer: "Error: Cannot read property 'name' of undefined"
17 |
--------------------------------------------------------------------------------
/apps/www/features/submission-theory/model/formSchema.ts:
--------------------------------------------------------------------------------
1 | import { z } from "zod";
2 |
3 | import { Difficulty } from "~/entities/challenge/model/types";
4 | import { DIFFICULTY_RANK } from "~/entities/challenge/model/constants";
5 |
6 | export const formSchema = z.object({
7 | title: z.string().min(2).max(100),
8 | tags: z.string(),
9 | type: z.enum(["question", "quiz", "theory"]),
10 | answer: z.string().optional(),
11 | difficulty: z.enum(DIFFICULTY_RANK as [Difficulty]),
12 | });
13 |
--------------------------------------------------------------------------------
/challenges/346-promise-order/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Promise Order
3 | type: quiz
4 | tags: javascript, promises
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: "2024-12-26"
10 | options:
11 | - "1, 2, 3, 4, 7, 5, 6, 9, 8"
12 | - "1, 2, 3, 4, 5, 6, 7, 8, 9"
13 | - "1, 4, 7, 2, 3, 5, 6, 9, 8"
14 | - "1, 2, 3, 4, 7, 8, 9, 5, 6"
15 | right_answer: "1, 2, 3, 4, 7, 5, 6, 9, 8"
16 |
--------------------------------------------------------------------------------
/challenges/374-stale-callback/template.react.md:
--------------------------------------------------------------------------------
1 | ```jsx App.jsx
2 | import { useState, useCallback } from "react";
3 |
4 | export default function App() {
5 | const [value, setValue] = useState();
6 |
7 | const onClick = useCallback(() => {
8 | console.log("Submitted value:" + value);
9 | }, []);
10 |
11 | return (
12 | <>
13 | setValue(e.target.value)} />
14 |
15 | >
16 | );
17 | }
18 | ```
19 |
--------------------------------------------------------------------------------
/challenges/61-logical-operators/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Logical Operators
3 | type: quiz
4 | tags: javascript, logical operators
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: "2024-05-18"
10 | discussionNo: 65
11 | options:
12 | - |
13 | "&&" and "||"
14 | - |
15 | "==" and "!="
16 | - |
17 | "===" and "!=="
18 | - |
19 | "++" and "--"
20 | right_answer: 2
21 |
--------------------------------------------------------------------------------
/challenges/69-two-functions-one-object/template.javascript.md:
--------------------------------------------------------------------------------
1 | ```js index.js
2 | export function A() {
3 | // your code here
4 | }
5 |
6 | export function B() {
7 | // your code here
8 | }
9 | ```
10 |
11 | ```js index.test.js
12 | import { A, B } from "./index";
13 |
14 | describe("Constructor Functions A and B", () => {
15 | test("new A() should equal new B()", () => {
16 | let a = new A();
17 | let b = new B();
18 |
19 | expect(a).toBe(b);
20 | });
21 | });
22 | ```
23 |
--------------------------------------------------------------------------------
/apps/www/entities/blog/model/types.ts:
--------------------------------------------------------------------------------
1 | export type Blog = {
2 | title: string;
3 | path: string;
4 | slug: string;
5 | excerpt: string;
6 | published_at: string;
7 | tags: string[];
8 | code: string;
9 | emoji: string;
10 | };
11 |
12 | /**
13 | * Props for blog list components
14 | */
15 | export interface BlogListProps {
16 | blogs: Blog[];
17 | }
18 |
19 | /**
20 | * Props for blog detail components
21 | */
22 | export interface BlogDetailProps {
23 | blog: Blog;
24 | }
25 |
--------------------------------------------------------------------------------
/apps/www/entities/challenge/lib/sortChallengesByDifficulty.ts:
--------------------------------------------------------------------------------
1 | import { ChallengeList } from "~/entities/challenge/model/types";
2 | import { DIFFICULTY_RANK } from "~/entities/challenge/model/constants";
3 |
4 | export function sortChallengesByDifficulty(challenges: ChallengeList, sort_order?: "asc" | "desc") {
5 | return challenges.sort(
6 | (a, b) =>
7 | (DIFFICULTY_RANK.indexOf(a.difficulty) - DIFFICULTY_RANK.indexOf(b.difficulty)) * (sort_order === "asc" ? 1 : -1),
8 | );
9 | }
10 |
--------------------------------------------------------------------------------
/challenges/393-useeffect-3/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: medium
2 | title: useEffect 3
3 | type: quiz
4 | tags: react
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: '2025-08-19'
10 | options:
11 | - "1, 5, 2, 4, 1, 6, 3, 5, 2"
12 | - "1, 2, 4, 5, 1, 3, 6, 2, 5"
13 | - "1, 4, 2, 5, 1, 3, 6, 5, 2"
14 | - "1, 2, 5, 4, 1, 6, 3, 2, 5"
15 | right_answer: "1, 5, 2, 4, 1, 6, 3, 5, 2"
16 | level: senior
17 |
18 |
--------------------------------------------------------------------------------
/challenges/348-promise-resolution-order/solution.md:
--------------------------------------------------------------------------------
1 | The code will output:
2 |
3 | ```
4 | 1
5 | ```
6 |
7 | This is because:
8 |
9 | 1. In a Promise, only the first `resolve()` or `reject()` call takes effect
10 | 2. Once a Promise is settled (either resolved or rejected), it cannot change its state
11 | 3. In this case, `resolve(1)` is called first, so the subsequent `resolve(2)` and `reject('error')` are ignored
12 | 4. The `.then()` handler receives the value from the first `resolve(1)` call and logs it
13 |
--------------------------------------------------------------------------------
/challenges/401-usestate/README.md:
--------------------------------------------------------------------------------
1 | What will be the output in console for the following code when button is clicked:
2 |
3 | ```jsx
4 | import { useState, Suspense } from "react";
5 |
6 | export default function App() {
7 | const [count, setCount] = useState(0);
8 |
9 | const updateCount = () => {
10 | setCount(count + 1);
11 | setCount(count + 2);
12 | }
13 |
14 | console.log(count);
15 |
16 | return (
17 |
18 | );
19 | }
20 | ```
21 |
--------------------------------------------------------------------------------
/apps/www/entities/comment/hooks/useComment.ts:
--------------------------------------------------------------------------------
1 | import { useQuery } from "@tanstack/react-query";
2 |
3 | import { getAllIssueComments } from "~/entities/comment/api/getIssueComments";
4 |
5 | export function useComment(challengeNo: number) {
6 | const commentQuery = useQuery({
7 | queryKey: ["comment", challengeNo],
8 | queryFn: async () => {
9 | return getAllIssueComments(challengeNo);
10 | },
11 | });
12 |
13 | return { isLoading: commentQuery.isPending, data: commentQuery.data };
14 | }
15 |
--------------------------------------------------------------------------------
/apps/www/entities/roadmap/api/getRoadmaps.ts:
--------------------------------------------------------------------------------
1 | import fs from "fs";
2 |
3 | import type { Roadmap } from "~/entities/roadmap/model/types";
4 |
5 | import { ROADMAP_ROOT } from "../model/constants";
6 | import { getRoadmapByPath } from "./getRoadmapByPath";
7 |
8 | export async function getRoadmaps(): Promise {
9 | const folders = fs.readdirSync(ROADMAP_ROOT);
10 |
11 | const studyPlans = await Promise.all(folders.map(async (dir: string) => getRoadmapByPath(dir)));
12 |
13 | return studyPlans;
14 | }
15 |
--------------------------------------------------------------------------------
/challenges/121-f-prototype/solution.md:
--------------------------------------------------------------------------------
1 | The output will be:
2 |
3 | ```
4 | true
5 | true
6 | false
7 | ```
8 |
9 | - `rabbit1.eats` logs `true` because `rabbit1` is created when `Rabbit.prototype` has `eats` set to `true`.
10 | - `rabbit1.eats` logs `true` again because reassigning `Rabbit.prototype` creates a new prototype object but does not affect existing instances.
11 | - `rabbit2.eats` logs `false` because `rabbit2` is created after `Rabbit.prototype` is reassigned to a new object with `eats` set to `false`.
12 |
--------------------------------------------------------------------------------
/challenges/1-rtl-icon/info.yml:
--------------------------------------------------------------------------------
1 | title: Icon and RTL
2 | excerpt: Fix the broken icon in RTL mode.
3 | difficulty: easy
4 | author:
5 | name: Pawan Kumar
6 | email: pawankumar2901@gmail.com
7 | github: jsartisan
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | tags: css, logical properties
10 | resources:
11 | - https://developer.mozilla.org/en-US/docs/Web/CSS/margin-inline-start
12 | - https://css-tricks.com/almanac/properties/g/gap/
13 | template: vanilla
14 | published_date: 2024-01-03
15 |
--------------------------------------------------------------------------------
/challenges/123-f-prototype-and-constructor/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: F.prototype and constructor
3 | type: quiz
4 | tags: javascript
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: "2024-07-27"
10 | discussionNo: 126
11 | options:
12 | - "John, true, Pete, false"
13 | - "John, true, Pete, true"
14 | - "John, false, Pete, false"
15 | - "John, false, Pete, true"
16 | right_answer: "John, true, Pete, false"
17 |
--------------------------------------------------------------------------------
/apps/www/components/ui/icon-button.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import React, { ComponentRef, forwardRef } from "react";
4 |
5 | import { cn } from "../../utils/helpers";
6 | import { ButtonProps, Button } from "./button";
7 |
8 | export const IconButton = forwardRef, ButtonProps>((props, ref) => {
9 | const { className, ...rest } = props;
10 |
11 | return ;
12 | });
13 |
14 | IconButton.displayName = "IconButton";
15 |
--------------------------------------------------------------------------------
/challenges/486-find-corresponding-node/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Find Corresponding Node
3 | type: question
4 | template: javascript
5 | tags: javascript
6 | author:
7 | github: jsartisan
8 | name: Pawan Kumar
9 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
10 | published_date: '2025-09-27'
11 | resources:
12 | - https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker
13 | - https://developer.mozilla.org/en-US/docs/Web/API/Document/children
14 | - https://javascript.info/dom-navigation
15 |
--------------------------------------------------------------------------------
/apps/www/entities/challenge/api/getAllChallengesTags.ts:
--------------------------------------------------------------------------------
1 | import { ChallengeList } from "~/entities/challenge/model/types";
2 |
3 | import { getChallengeInfoByLocale } from "./getChallengeInfoByLocale";
4 |
5 | export function getAllChallengesTags(challenges: ChallengeList, locale: string) {
6 | const set = new Set();
7 | for (const quiz of challenges) {
8 | const info = getChallengeInfoByLocale(quiz, locale);
9 | for (const tag of info?.tags || []) set.add(tag);
10 | }
11 | return Array.from(set).sort();
12 | }
13 |
--------------------------------------------------------------------------------
/challenges/7-promise-order/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | importance: high
3 | title: Promise Order
4 | tags: javascript, promise, event loop
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: 2024-02-02
10 | type: quiz
11 | options:
12 | - "1, 2, 3, 4, 7, 5, 6, 9, 8"
13 | - "1, 2, 3, 4, 5, 6, 7, 8, 9"
14 | - "1, 2, 3, 4, 7, 8, 9, 5, 6"
15 | - "1, 4, 7, 2, 3, 5, 6, 9, 8"
16 | right_answer: "1, 2, 3, 4, 7, 5, 6, 9, 8"
17 | level: junior
18 |
--------------------------------------------------------------------------------
/apps/www/app/(default)/layout.tsx:
--------------------------------------------------------------------------------
1 | import { PropsWithChildren } from "react";
2 |
3 | import { Header } from "~/widgets/Header";
4 | import { Footer } from "~/widgets/Footer";
5 |
6 | export default function Layout(props: PropsWithChildren) {
7 | const { children } = props;
8 |
9 | return (
10 | <>
11 |
12 |
13 | {children}
14 |
15 |
16 | >
17 | );
18 | }
19 |
--------------------------------------------------------------------------------
/apps/www/entities/answer/hooks/useAnswers.ts:
--------------------------------------------------------------------------------
1 | import { useQuery } from "@tanstack/react-query";
2 |
3 | import { getAnswersOfQuestion } from "~/entities/answer/api/getAnswerOfQuestions";
4 |
5 | export function useAnswers(...args: Parameters) {
6 | const answersQuery = useQuery({
7 | queryKey: ["answers", args["0"].no],
8 | queryFn: async () => {
9 | return getAnswersOfQuestion(...args);
10 | },
11 | });
12 |
13 | return { isLoading: answersQuery.isPending, answers: answersQuery.data };
14 | }
15 |
--------------------------------------------------------------------------------
/apps/www/features/auth/ui/UserNav.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { Skeleton } from "~/components/ui/skeleton";
4 | import { useAuth } from "~/features/auth/hooks/useAuth";
5 | import { UserDropdown } from "~/features/auth/ui/UserDropdown";
6 | import { SignInButton } from "~/features/auth/ui/SignInButton";
7 |
8 | export default function LoginNav() {
9 | const auth = useAuth();
10 |
11 | if (auth.isLoading) return ;
12 |
13 | if (auth.user) return ;
14 |
15 | return ;
16 | }
17 |
--------------------------------------------------------------------------------
/apps/www/components/icons/XIcon.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 |
3 | export function XIcon(props: React.ComponentProps<"svg">) {
4 | return (
5 |
11 | );
12 | }
13 |
--------------------------------------------------------------------------------
/apps/www/shared/context/QueryProvider.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { useState } from "react";
4 | import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
5 |
6 | export function QueryProvider({ children }) {
7 | const [queryClient] = useState(
8 | () =>
9 | new QueryClient({
10 | defaultOptions: {
11 | queries: {
12 | staleTime: Infinity,
13 | },
14 | },
15 | }),
16 | );
17 |
18 | return {children};
19 | }
20 |
--------------------------------------------------------------------------------
/challenges/47-checkbox/template.vanilla.md:
--------------------------------------------------------------------------------
1 | ```css styles.css
2 | body {
3 | font-family: sans-serif;
4 | }
5 |
6 | h1 {
7 | font-size: 1.5rem;
8 | }
9 | ```
10 |
11 | ```js index.js
12 | import "./styles.css";
13 | ```
14 |
15 | ```html index.html
16 |
17 |
18 |
19 | Parcel Sandbox
20 |
21 |
22 |
23 |
24 |
28 |
29 |
30 | ```
31 |
--------------------------------------------------------------------------------
/apps/www/components/icons/ChevronRightIcon.tsx:
--------------------------------------------------------------------------------
1 | import React, { ComponentProps } from "react";
2 |
3 | export function ChevronRightIcon(props: ComponentProps<"svg">) {
4 | return (
5 |
15 | );
16 | }
17 |
--------------------------------------------------------------------------------
/apps/www/components/icons/ChevronDownIcon.tsx:
--------------------------------------------------------------------------------
1 | import React, { ComponentProps } from "react";
2 |
3 | export function ChevronDownIcon(props: ComponentProps<"svg">) {
4 | return (
5 |
14 | );
15 | }
16 |
--------------------------------------------------------------------------------
/apps/www/components/icons/ChevronLeftIcon.tsx:
--------------------------------------------------------------------------------
1 | import React, { ComponentProps } from "react";
2 |
3 | export function ChevronLeftIcon(props: ComponentProps<"svg">) {
4 | return (
5 |
15 | );
16 | }
17 |
--------------------------------------------------------------------------------
/apps/www/entities/blog/api/getBlogBySlug.ts:
--------------------------------------------------------------------------------
1 | import fs from "fs";
2 | import path from "path";
3 |
4 | import type { Blog } from "~/entities/blog/model/types";
5 |
6 | import { CONTENT_PATH } from "~/shared/config/paths";
7 | import { bundleMarkdown } from "~/shared/lib/bundleMarkdown";
8 |
9 | export const getBlogBySlug = async (slug: string) => {
10 | const source = fs.readFileSync(path.join(CONTENT_PATH, "blog", `${slug}/index.md`), "utf8");
11 | const { code, frontmatter } = await bundleMarkdown(source);
12 |
13 | return { ...frontmatter, code } as Blog;
14 | };
15 |
--------------------------------------------------------------------------------
/apps/www/components/icons/ChevronUpIcon.tsx:
--------------------------------------------------------------------------------
1 | import React, { ComponentProps } from "react";
2 |
3 | export function ChevronUpIcon(props: ComponentProps<"svg">) {
4 | return (
5 |
15 | );
16 | }
17 |
--------------------------------------------------------------------------------
/apps/www/eslint.config.js:
--------------------------------------------------------------------------------
1 | import baseConfig from "../../eslint.config.js";
2 |
3 | export default [
4 | ...baseConfig,
5 | // Add ignore patterns specific to the www app
6 | {
7 | ignores: [
8 | "**/dist/**",
9 | "**/build/**",
10 | "**/node_modules/**",
11 | "**/.next/**",
12 | "**/.out/**",
13 | "eslint.config.js",
14 | "eslint.config.mjs",
15 | ],
16 | },
17 | {
18 | // Override or add specific rules for the www app if needed
19 | rules: {
20 | // Add any www-specific rules here
21 | },
22 | },
23 | ];
24 |
--------------------------------------------------------------------------------
/challenges/531-stopwatch/README.md:
--------------------------------------------------------------------------------
1 | Create a stopwatch component that tracks elapsed time. It should display the current timer and provide two buttons: Start/Stop and Reset.
2 |
3 | ### Specifications
4 |
5 | - Start/Stop: Toggles the stopwatch between running and paused states.
6 | - Reset: Stops the stopwatch and resets the time to zero.
7 | - Display: Show elapsed time in seconds with millisecond precision.
8 | - Click-to-Toggle: Clicking the timer itself should also start/stop the stopwatch, with the button label updating to match the state.
9 | - Format the display as hh:mm:ss:ms.
10 |
--------------------------------------------------------------------------------
/apps/www/features/submission-quiz/model/formSchema.ts:
--------------------------------------------------------------------------------
1 | import { z } from "zod";
2 |
3 | import { Difficulty } from "~/entities/challenge/model/types";
4 | import { DIFFICULTY_RANK } from "~/entities/challenge/model/constants";
5 |
6 | export const formSchema = z.object({
7 | title: z.string().min(2).max(50),
8 | template: z.string().optional(),
9 | readme: z.string(),
10 | tags: z.string(),
11 | files: z.any().optional(),
12 | type: z.enum(["question", "quiz", "theory"]),
13 | answer: z.string().optional(),
14 | difficulty: z.enum(DIFFICULTY_RANK as [Difficulty]),
15 | });
16 |
--------------------------------------------------------------------------------
/apps/www/features/submission-theory/ui/FormHeader.tsx:
--------------------------------------------------------------------------------
1 | import { Button } from "~/components/ui";
2 |
3 | export function FormHeader() {
4 | return (
5 |
6 |
7 |
Submit a new theory question
8 |
Write the answer for the theory question
9 |
10 |
11 |
12 |
13 |
14 | );
15 | }
16 |
--------------------------------------------------------------------------------
/apps/www/entities/roadmap/lib/parseRoadmap.ts:
--------------------------------------------------------------------------------
1 | import YAML from "js-yaml";
2 |
3 | import { RoadmapInfo } from "~/entities/roadmap/model/types";
4 |
5 | export function parseRoadmap(s: string): RoadmapInfo {
6 | const object = YAML.load(s) as any;
7 |
8 | const arrayKeys = ["tags", "related"];
9 |
10 | for (const key of arrayKeys) {
11 | if (object && object[key]) {
12 | object[key] = (object[key] || "")
13 | .toString()
14 | .split(",")
15 | .map((i: string) => i.trim())
16 | .filter(Boolean);
17 | }
18 | }
19 |
20 | return object;
21 | }
22 |
--------------------------------------------------------------------------------
/apps/www/features/auth/api/getAuthUser.ts:
--------------------------------------------------------------------------------
1 | import { supabase } from "~/shared/api/supabase/client";
2 |
3 | export async function getAuthUser() {
4 | const session = await supabase.auth.getSession();
5 |
6 | if (!session.data.session) return Promise.resolve(null);
7 |
8 | const userData = await supabase.auth.getUser();
9 |
10 | if (!userData.data.user) return Promise.resolve(null);
11 |
12 | const profileData = await supabase.from("profiles").select("*").eq("id", userData.data.user.id);
13 |
14 | return {
15 | ...userData.data.user,
16 | ...profileData.data?.[0],
17 | };
18 | }
19 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "lib": ["dom", "dom.iterable", "esnext"],
4 | "allowJs": true,
5 | "skipLibCheck": true,
6 | "strict": false,
7 | "noEmit": true,
8 | "incremental": true,
9 | "module": "esnext",
10 | "esModuleInterop": true,
11 | "moduleResolution": "node",
12 | "resolveJsonModule": true,
13 | "isolatedModules": true,
14 | "noImplicitAny": false,
15 | "jsx": "preserve",
16 | "baseUrl": "."
17 | },
18 | "exclude": ["node_modules"],
19 | "include": ["next-env.d.ts", ".next/types/**/*.ts", "**/*.ts", "**/*.tsx"]
20 | }
21 |
--------------------------------------------------------------------------------
/turbo.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://turbo.build/schema.json",
3 | "globalDependencies": [
4 | "**/.env.*local"
5 | ],
6 | "tasks": {
7 | "build": {
8 | "dependsOn": [
9 | "^build"
10 | ],
11 | "outputs": [
12 | ".next/**",
13 | "!.next/cache/**",
14 | "dist/**"
15 | ]
16 | },
17 | "dev": {
18 | "cache": false,
19 | "persistent": true
20 | },
21 | "start": {
22 | "dependsOn": [
23 | "build"
24 | ]
25 | },
26 | "lint": {},
27 | "lint:fix": {},
28 | "check-types": {}
29 | }
30 | }
--------------------------------------------------------------------------------
/apps/www/components/icons/LogClearIcon.tsx:
--------------------------------------------------------------------------------
1 | import React, { ComponentProps } from "react";
2 |
3 | export function LogClearIcon(props: ComponentProps<"svg">) {
4 | return (
5 |
15 | );
16 | }
17 |
--------------------------------------------------------------------------------
/challenges/526-useprevious/template.react.md:
--------------------------------------------------------------------------------
1 | ```jsx App.jsx
2 | import { useState } from "react";
3 | import { usePrevious } from "./usePrevious";
4 |
5 | export default function App() {
6 | const [count, setCount] = useState(0);
7 | const prevCount = usePrevious(count);
8 |
9 | return (
10 |
11 |
Current: {count}
12 |
Previous: {prevCount}
13 |
14 |
15 | );
16 | }
17 | ```
18 |
19 | ```js usePrevious.js active
20 | export function usePrevious(value) {
21 |
22 | }
23 | ```
24 |
25 |
26 |
--------------------------------------------------------------------------------
/apps/www/components/icons/SpinnerIcon.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps } from "react";
2 |
3 | export const SpinnerIcon = (props: ComponentProps<"svg">) => {
4 | return (
5 |
13 | );
14 | };
15 |
--------------------------------------------------------------------------------
/apps/www/shared/ui/mdx/MDXComponent.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { getMDXComponent } from "mdx-bundler/client";
3 |
4 | import { cn } from "~/utils/helpers";
5 |
6 | import { components } from "./components";
7 |
8 | type MDXComponentProps = {
9 | code: string;
10 | className?: string;
11 | };
12 |
13 | function MDXComponent(props: MDXComponentProps) {
14 | const Comp = getMDXComponent(props.code);
15 |
16 | return (
17 |
18 |
19 |
20 | );
21 | }
22 |
23 | export { MDXComponent };
24 |
--------------------------------------------------------------------------------
/apps/www/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | node_modules
5 | /.pnp
6 | .pnp.js
7 | .yarn/install-state.gz
8 |
9 | # testing
10 | /coverage
11 |
12 | # next.js
13 | .next/
14 | /out/
15 |
16 | # production
17 | /build
18 |
19 | # misc
20 | .DS_Store
21 | *.pem
22 | .eslintcache
23 |
24 | # debug
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
29 | # local env files
30 | .env*
31 | .env*.local
32 |
33 | # vercel
34 | .vercel
35 |
36 | # typescript
37 | *.tsbuildinfo
38 | next-env.d.ts
39 |
40 | # playground
41 | /playground
--------------------------------------------------------------------------------
/apps/www/app/(default)/blog/[slug]/page.tsx:
--------------------------------------------------------------------------------
1 | import { getAllBlogs, getBlogBySlug } from "~/entities/blog/api";
2 | import { BlogDetailPage } from "~/screens/blog/ui/BlogDetailPage";
3 |
4 | export function generateStaticParams() {
5 | const posts = getAllBlogs();
6 |
7 | const transformedPosts = posts.map((p) => ({
8 | slug: p.slug,
9 | }));
10 |
11 | return transformedPosts;
12 | }
13 |
14 | export async function generateMetadata(props: PageProps<"/blog/[slug]">) {
15 | const blog = await getBlogBySlug((await props.params).slug);
16 | return { title: blog.title };
17 | }
18 |
19 | export default BlogDetailPage;
20 |
--------------------------------------------------------------------------------
/challenges/2-click-outisde/template.react.md:
--------------------------------------------------------------------------------
1 | ```js App.jsx
2 | import { useRef } from "react";
3 | import useClickOutside from "./useClickOutside";
4 |
5 | function App() {
6 | const ref = useRef(null);
7 |
8 | useClickOutside(ref, () => {
9 | alert("clicked outside");
10 | });
11 |
12 | return (
13 |
14 |
Click outside React
15 |
16 | );
17 | }
18 |
19 | export default App;
20 | ```
21 |
22 | ```js useClickOutside.js active
23 | import { useEffect } from "react";
24 |
25 | const useClickOutside = (ref, callback) => {};
26 |
27 | export default useClickOutside;
28 | ```
29 |
--------------------------------------------------------------------------------
/challenges/356-hoisting/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Hoisting
3 | type: quiz
4 | tags: javascript
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: "2025-08-12"
10 | resources:
11 | - https://javascript.info/var
12 | - https://developer.mozilla.org/en-US/docs/Glossary/Hoisting
13 | options:
14 | - "1, undefined, undefined, ReferenceError"
15 | - "1, undefined, 3, ReferenceError"
16 | - "1, 2, undefined, ReferenceError"
17 | - "1, undefined, undefined, 2"
18 | right_answer: "1, undefined, undefined, ReferenceError"
19 |
--------------------------------------------------------------------------------
/apps/www/components/icons/LogErrorIcon.tsx:
--------------------------------------------------------------------------------
1 | import React, { ComponentProps } from "react";
2 |
3 | export function LogErrorIcon(props: ComponentProps<"svg">) {
4 | return (
5 |
15 | );
16 | }
17 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feedback.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feedback
3 | about: Provide feedback on the site
4 | title: "[Feedback]: ..."
5 | labels: feedback
6 | assignees: jsartisan
7 | ---
8 |
9 | ### 💡 Site Feedback
10 |
11 | **Your Feedback**
12 | Please provide your thoughts, ideas, or suggestions to improve the site.
13 |
14 | **What did you like?**
15 | Tell us what you liked about the site!
16 |
17 | **What could be improved?**
18 | Share any areas you think could be improved or enhanced.
19 |
20 | **Additional context**
21 | Add any other comments or suggestions, such as features you'd like to see or changes that would improve the user experience.
22 |
--------------------------------------------------------------------------------
/apps/www/features/submission-question/model/formSchema.ts:
--------------------------------------------------------------------------------
1 | import { z } from "zod";
2 |
3 | import { Difficulty } from "~/entities/challenge/model/types";
4 | import { DIFFICULTY_RANK } from "~/entities/challenge/model/constants";
5 |
6 | export const formSchema = z.object({
7 | title: z.string().min(2).max(50),
8 | template: z.string().optional(),
9 | readme: z.string(),
10 | tags: z.string(),
11 | files: z.any().optional(),
12 | type: z.enum(["question", "quiz", "theory"]),
13 | answer: z.string().optional(),
14 | difficulty: z.enum(DIFFICULTY_RANK as [Difficulty]),
15 | });
16 |
17 | export type FormValues = z.infer;
18 |
--------------------------------------------------------------------------------
/apps/www/screens/playground/lib/getFilesFromLocalStorage.ts:
--------------------------------------------------------------------------------
1 | import { getLocalStorageItem } from "~/shared/lib/localStorage";
2 | import { TEMPLATES } from "~/entities/challenge/model/templates";
3 | import { SupportedTemplates } from "~/entities/challenge/model/types";
4 |
5 | export const getFilesFromLocalStorage = (template: SupportedTemplates) => {
6 | try {
7 | const parsedFiles = getLocalStorageItem(`/playground-${template}`, null);
8 |
9 | return {
10 | ...TEMPLATES[template].files,
11 | ...parsedFiles,
12 | };
13 | } catch (e) {
14 | console.error(e);
15 |
16 | return TEMPLATES[template].files;
17 | }
18 | };
19 |
--------------------------------------------------------------------------------
/challenges/352-promise-chain-output-2/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Promise Chain Output 2
3 | type: quiz
4 | tags: javascript, promises
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: "2024-12-26"
10 | options:
11 | - "1, 2, undefined, 3, undefined, 4, undefined, undefined"
12 | - "1, 2, 3, undefined, 4, undefined, undefined, undefined"
13 | - "1, 2, undefined, 3, 4, undefined, undefined, undefined"
14 | - "1, 2, 3, 4, undefined, undefined, undefined, undefined"
15 | right_answer: "1, 2, undefined, 3, undefined, 4, undefined, undefined"
16 |
--------------------------------------------------------------------------------
/apps/www/entities/challenge/lib/sortChallengesByDate.ts:
--------------------------------------------------------------------------------
1 | import { DEFAULT_LOCALE } from "~/shared/config/locale";
2 | import { ChallengeList } from "~/entities/challenge/model/types";
3 |
4 | export function sortChallengesByDate(challenges: ChallengeList, sortOrder: "asc" | "desc") {
5 | const sorted = challenges.sort((a, b) => {
6 | const aDate = new Date(a.info[DEFAULT_LOCALE]?.published_date || "1970-01-01");
7 | const bDate = new Date(b.info[DEFAULT_LOCALE]?.published_date || "1970-01-01");
8 |
9 | return sortOrder === "asc" ? aDate.getTime() - bDate.getTime() : bDate.getTime() - aDate.getTime();
10 | });
11 |
12 | return sorted;
13 | }
14 |
--------------------------------------------------------------------------------
/apps/www/shared/ui/FullPageLoader.tsx:
--------------------------------------------------------------------------------
1 | import Image from "next/image";
2 |
3 | import logo from "~/public/images/logo.svg";
4 |
5 | interface FullPageLoaderProps {
6 | description?: string;
7 | }
8 |
9 | export function FullPageLoader(props: FullPageLoaderProps) {
10 | const { description } = props;
11 |
12 | return (
13 |
14 |
15 | {description &&
{description}
}
16 |
17 | );
18 | }
19 |
--------------------------------------------------------------------------------
/challenges/503-reorder-array-with-new-indexes/README.md:
--------------------------------------------------------------------------------
1 | Suppose we have an array of items - `A`, and another array of indexes in numbers - `B`
2 |
3 | ```js
4 | const A = ['A', 'B', 'C', 'D', 'E', 'F']
5 | const B = [1, 5, 4, 3, 2, 0]
6 | ```
7 |
8 | You need to reorder A, so that the A[i] is put at index of B[i], which means B is the new index for each item of A.
9 |
10 | For above example A should be modified inline to following
11 |
12 | ```js
13 | ['F', 'A', 'E', 'D', 'C', 'B']
14 | ```
15 |
16 | The input are always valid.
17 |
18 | **Follow-up**: It is fairly easy to do this by using extra `O(n)` space, could you solve it with `O(1)` space?
19 |
--------------------------------------------------------------------------------
/apps/www/features/code-editor/ui/Console.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { SandpackConsole } from "@codesandbox/sandpack-react";
4 | import { ImperativePanelHandle } from "react-resizable-panels";
5 | import { ComponentPropsWithRef, MutableRefObject } from "react";
6 |
7 | import { cn } from "~/utils/helpers";
8 |
9 | type Props = {
10 | className?: string;
11 | panelRef?: MutableRefObject;
12 | } & ComponentPropsWithRef<"div">;
13 |
14 | export function Console(props: Props) {
15 | const { className } = props;
16 |
17 | return ;
18 | }
19 |
--------------------------------------------------------------------------------
/challenges/350-promise-chain-output/solution.md:
--------------------------------------------------------------------------------
1 | The output will be: `6`
2 |
3 | 1. `Promise.resolve(1)` → Initial value is `1`
4 | 2. `.then(() => 2)` → Returns `2`
5 | 3. `.then(3)` → Ignored because `3` is not a function, passes previous value `2`
6 | 4. `.then((value) => value * 3)` → `2 * 3 = 6`
7 | 5. `.then(Promise.resolve(4))` → Ignored because it's not a function, passes previous value `6`
8 | 6. `.then(console.log)` → Prints `6`
9 |
10 | **Key points**:
11 |
12 | - If `.then()` receives a non-function (like `3` or `Promise.resolve(4)`), it ignores that handler and passes the previous value through
13 | - Only function handlers are executed in the chain
14 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | node_modules
5 | /.pnp
6 | .pnp.js
7 | .yarn/install-state.gz
8 |
9 | # testing
10 | /coverage
11 |
12 | # next.js
13 | .next/
14 | /out/
15 |
16 | # production
17 | /build
18 |
19 | # misc
20 | .DS_Store
21 | *.pem
22 | .eslintcache
23 |
24 | # debug
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
29 | # local env files
30 | .env*
31 | .env*.local
32 |
33 | # vercel
34 | .vercel
35 |
36 | # typescript
37 | *.tsbuildinfo
38 | next-env.d.ts
39 |
40 | # playground
41 | /playground
42 |
43 | # apps/interview
44 |
45 | .turbo
--------------------------------------------------------------------------------
/apps/www/components/icons/LogAllIcon.tsx:
--------------------------------------------------------------------------------
1 | import React, { ComponentProps } from "react";
2 |
3 | export function LogAllIcon(props: ComponentProps<"svg">) {
4 | return (
5 |
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: "[Bug]: ..."
5 | labels: bug
6 | assignees: jsartisan
7 | ---
8 |
9 | **Describe the bug**
10 | A clear and concise description of what the bug is.
11 |
12 | **To Reproduce**
13 | Steps to reproduce the behavior:
14 |
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Additional context**
27 | Add any other context about the problem here.
28 |
--------------------------------------------------------------------------------
/.github/workflows/issue-pr.yml:
--------------------------------------------------------------------------------
1 | name: Issue to Pull Request
2 |
3 | on:
4 | issues:
5 | types: [opened, edited]
6 |
7 | jobs:
8 | start:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: actions/checkout@v3
12 |
13 | - uses: pnpm/action-setup@v2
14 | with:
15 | version: 9.6.0
16 | cache: true # handles caching automatically
17 |
18 | - uses: actions/setup-node@v3
19 | with:
20 | node-version: 18
21 | # ⛔️ don't add cache: 'pnpm' here
22 |
23 | - run: pnpm install --frozen-lockfile --prefer-offline
24 | - run: pnpm exec esno apps/www/scripts/actions/loader.ts ${{ github.token }} issue-pr
25 |
--------------------------------------------------------------------------------
/apps/www/components/icons/VueColorIcon.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps } from "react";
2 |
3 | export const VueColorIcon = (props: ComponentProps<"svg">) => {
4 | return (
5 |
17 | );
18 | };
19 |
--------------------------------------------------------------------------------
/apps/www/entities/roadmap/model/types.ts:
--------------------------------------------------------------------------------
1 | import { DeepPartial } from "utility-types";
2 |
3 | import { ChallengeList } from "~/entities/challenge/model/types";
4 |
5 | export type Roadmap = {
6 | title: string;
7 | path?: string;
8 | topics: {
9 | title: string;
10 | challenges: ChallengeList;
11 | }[];
12 | info: Record | undefined>;
13 | };
14 |
15 | export type RoadmapInfo = {
16 | title: string;
17 | description: string;
18 | topics: {
19 | title: string;
20 | challenges: string[];
21 | }[];
22 | };
23 |
24 | export type RoadmapSlim = Pick;
25 | export type RoadmapList = RoadmapSlim[];
26 |
--------------------------------------------------------------------------------
/apps/www/features/code-editor/lib/setLanguage.ts:
--------------------------------------------------------------------------------
1 | export const setLanguage = function (activeFile) {
2 | switch (activeFile.split(".").pop()) {
3 | case "js":
4 | return "javascript";
5 | case "jsx":
6 | return "javascript";
7 | case "ts":
8 | return "typescript";
9 | case "tsx":
10 | return "typescript";
11 | case "css":
12 | return "css";
13 | case "scss":
14 | return "scss";
15 | case "html":
16 | return "html";
17 | case "json":
18 | return "json";
19 | case "md":
20 | return "markdown";
21 | case "svelte":
22 | return "html";
23 | default:
24 | return "plaintext";
25 | }
26 | };
27 |
--------------------------------------------------------------------------------
/apps/www/features/leaderboard/ui/Leaderboard.tsx:
--------------------------------------------------------------------------------
1 | import { cn } from "~/utils/helpers";
2 |
3 | import { TopLeaderboardUserList } from "./TopLeaderboardUserList";
4 |
5 | type LeaderboardProps = {
6 | className?: string;
7 | };
8 |
9 | export function Leaderboard(props: LeaderboardProps) {
10 | const { className } = props;
11 |
12 | return (
13 |
14 |
15 |
🏆 Leaderboard
16 |
The top contributors 🌟
17 |
18 |
19 |
20 | );
21 | }
22 |
--------------------------------------------------------------------------------
/apps/www/shared/lib/sessionStorage.ts:
--------------------------------------------------------------------------------
1 | import { STORAGE_KEY } from "../config/storage";
2 |
3 | export function getSessionStorageItem(key: string, defaultValue: any) {
4 | if (typeof window === "undefined") {
5 | return defaultValue;
6 | }
7 |
8 | const item = sessionStorage.getItem(`${STORAGE_KEY}:${key}`);
9 |
10 | if (!item) {
11 | return defaultValue;
12 | }
13 |
14 | try {
15 | return JSON.parse(item);
16 | } catch {
17 | return defaultValue;
18 | }
19 | }
20 |
21 | export function setSessionStorageItem(key: string, value: any) {
22 | if (typeof window === "undefined") return;
23 |
24 | sessionStorage.setItem(`${STORAGE_KEY}:${key}`, value);
25 | }
26 |
--------------------------------------------------------------------------------
/challenges/137-overriding-constructor/info.yml:
--------------------------------------------------------------------------------
1 | difficulty: easy
2 | title: Overriding constructor
3 | type: quiz
4 | tags: javascript
5 | author:
6 | github: jsartisan
7 | name: Pawan Kumar
8 | avatar_url: https://avatars.githubusercontent.com/u/6636360?v=4
9 | published_date: "2024-08-02"
10 | discussionNo: 139
11 | options:
12 | - "ReferenceError: Must call super constructor in derived class before accessing 'this'"
13 | - "TypeError: Class constructor Student cannot be invoked without 'new'"
14 | - "SyntaxError: Unexpected token 'this'"
15 | - "Works correctly, no error"
16 | right_answer: "ReferenceError: Must call super constructor in derived class before accessing 'this'"
17 |
--------------------------------------------------------------------------------
/apps/www/entities/challenge/model/constants.ts:
--------------------------------------------------------------------------------
1 | import { Difficulty } from "./types";
2 | import { TEMPLATES } from "./templates";
3 |
4 | // root
5 | export const CHALLENGES_ROOT = "../../challenges";
6 |
7 | // difficulty
8 | export const DIFFICULTY_COLORS = {
9 | easy: "7aad0c",
10 | medium: "d9901a",
11 | hard: "de3d37",
12 | extreme: "b11b8d",
13 | } as Record;
14 |
15 | export const DIFFICULTY_RANK = Object.keys(DIFFICULTY_COLORS) as (keyof typeof DIFFICULTY_COLORS)[];
16 |
17 | // templates
18 | export const DEFAULT_TEMPLATE = "vanilla";
19 | export const SUPPORTED_TEMPLATES = Object.keys(TEMPLATES) as (keyof typeof TEMPLATES)[];
20 |
21 | export { TEMPLATES };
22 |
--------------------------------------------------------------------------------
/apps/www/screens/blog/ui/BlogListPage.tsx:
--------------------------------------------------------------------------------
1 | import { BlogList } from "~/entities/blog/ui";
2 | import { getAllBlogs } from "~/entities/blog/api";
3 |
4 | function BlogListPage() {
5 | const blogs = getAllBlogs();
6 |
7 | return (
8 | <>
9 |
10 |
Blog
11 |
12 | Learn about the latest frontend technologies and best practices.
13 |
14 |
15 |
16 |
17 |
18 | >
19 | );
20 | }
21 |
22 | export { BlogListPage };
23 |
--------------------------------------------------------------------------------
/apps/www/components/icons/ExpandHorizontalIcon.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps } from "react";
2 |
3 | export const ExpandHorizontalIcon = (props: ComponentProps<"svg">) => (
4 |
21 | );
22 |
--------------------------------------------------------------------------------
/apps/www/entities/challenge/model/templates/tests.ts:
--------------------------------------------------------------------------------
1 | export const TESTS_TEMPLATE = {
2 | files: {
3 | "/index.js": {
4 | code: `export const add = (a, b) => a + b;`,
5 | },
6 | "/index.test.js": {
7 | code: `import { add } from './index';
8 |
9 | describe('add', () => {
10 | test('Commutative Law of Addition', () => {
11 | expect(add(1, 2)).toBe(add(2, 1));
12 | });
13 | });`,
14 | },
15 | "/package.json": {
16 | code: JSON.stringify({
17 | dependencies: {},
18 | main: "/index.js",
19 | devDependencies: {},
20 | }),
21 | },
22 | },
23 | main: "/index.test.js",
24 | environment: "parcel",
25 | mode: "tests",
26 | };
27 |
--------------------------------------------------------------------------------
/apps/www/components/icons/ExpandVerticalIcon.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps } from "react";
2 |
3 | export const ExpandVerticalIcon = (props: ComponentProps<"svg">) => (
4 |
21 | );
22 |
--------------------------------------------------------------------------------
/apps/www/entities/challenge/model/templates/static.ts:
--------------------------------------------------------------------------------
1 | import { commonFiles } from "./common";
2 |
3 | export const STATIC_TEMPLATE = {
4 | files: {
5 | ...commonFiles,
6 | "/index.html": {
7 | code: `
8 |
9 |
10 |
11 | Parcel Sandbox
12 |
13 |
14 |
15 |
16 |
17 | Hello world
18 |
19 |
20 | `,
21 | },
22 | "/package.json": {
23 | code: JSON.stringify({
24 | dependencies: {},
25 | main: "/index.html",
26 | }),
27 | },
28 | },
29 | main: "/index.html",
30 | environment: "static",
31 | };
32 |
--------------------------------------------------------------------------------
/apps/www/components/icons/ArrowDownIcon.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps } from "react";
2 |
3 | export const ArrowDownIcon = (props: ComponentProps<"svg">) => (
4 |
22 | );
23 |
--------------------------------------------------------------------------------
/apps/www/components/icons/ArrowUpIcon.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps } from "react";
2 |
3 | export const ArrowUpIcon = (props: ComponentProps<"svg">) => (
4 |
22 | );
23 |
--------------------------------------------------------------------------------
/apps/www/entities/completions/hooks/useCompletions.ts:
--------------------------------------------------------------------------------
1 | import { useQuery } from "@tanstack/react-query";
2 |
3 | import { useAuth } from "~/features/auth/hooks/useAuth";
4 | import { getCompletions } from "~/entities/completions/api/getCompletions";
5 |
6 | export function useCompletions() {
7 | const auth = useAuth();
8 | const completionsQuery = useQuery({
9 | queryKey: ["completions"],
10 | queryFn: () => {
11 | return getCompletions({ user_id: auth.user.id });
12 | },
13 | enabled: !!auth.user,
14 | });
15 |
16 | const completions = completionsQuery.data?.data?.map((c) => c.challenge_id) ?? [];
17 |
18 | return { completions, isLoading: completionsQuery.isFetching };
19 | }
20 |
--------------------------------------------------------------------------------
/challenges/40-layout-1/template.vanilla.md:
--------------------------------------------------------------------------------
1 | ```css styles.css active
2 | .container {
3 | }
4 |
5 | .item {
6 | background: #e1e1e1;
7 | height: 100px;
8 | }
9 | ```
10 |
11 | ```js index.js hidden
12 | import "./styles.css";
13 | ```
14 |
15 | ```html index.html
16 |
17 |
18 |
19 | Parcel Sandbox
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | ```
35 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ""
5 | labels: enhancement
6 | assignees: markmead
7 | ---
8 |
9 | **Is your feature request related to a problem? Please describe.**
10 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11 |
12 | **Describe the solution you'd like**
13 | A clear and concise description of what you want to happen.
14 |
15 | **Describe alternatives you've considered**
16 | A clear and concise description of any alternative solutions or features you've considered.
17 |
18 | **Additional context**
19 | Add any other context or screenshots about the feature request here.
20 |
--------------------------------------------------------------------------------
/apps/www/components/icons/CollapseHorizontalIcon.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps } from "react";
2 |
3 | export const CollapseHorizontalIcon = (props: ComponentProps<"svg">) => (
4 |
21 | );
22 |
--------------------------------------------------------------------------------
/apps/www/components/icons/CollapseVerticalIcon.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps } from "react";
2 |
3 | export const CollapseVerticalIcon = (props: ComponentProps<"svg">) => (
4 |
21 | );
22 |
--------------------------------------------------------------------------------
/challenges/360-reconcilation-bug/template.react.md:
--------------------------------------------------------------------------------
1 | ```jsx App.jsx
2 | import { useState } from "react";
3 |
4 | export default function App() {
5 | const [isCompany, setIsCompany] = useState(false);
6 |
7 | return (
8 | <>
9 |
13 |
14 | {isCompany ? (
15 |
16 | ) : (
17 |
18 | )}
19 | >
20 | );
21 | }
22 | ```
23 |
--------------------------------------------------------------------------------
/challenges/405-sampling/README.md:
--------------------------------------------------------------------------------
1 | Implement a **sampling function** in TypeScript.
2 | The function should take two arguments:
3 |
4 | 1. A callback function.
5 | 2. A number `count`.
6 |
7 | The returned function should only execute the callback **once every `count` calls**, and ignore execution on other calls.
8 |
9 | ### Example
10 |
11 | ```ts
12 | const fn = () => console.log("Hello");
13 | const sampled = sampling(fn, 3);
14 |
15 | sampled(); // not executed
16 | sampled(); // not executed
17 | sampled(); // executed -> "Hello"
18 | sampled(); // not executed
19 | sampled(); // not executed
20 | sampled(); // executed -> "Hello"
21 | ```
22 |
23 | In this example, the callback executes only on every 3rd call.
24 |
--------------------------------------------------------------------------------
/challenges/520-todo-list/README.md:
--------------------------------------------------------------------------------
1 | Create a **Todo List** app
2 |
3 | The component should let users add tasks and remove them.
4 |
5 | ## Requirements
6 |
7 | ### Behaviour
8 |
9 | * Render an input field and a **Submit** button.
10 | * When the user clicks **Submit**:
11 |
12 | * Add the input text as a new task in the list.
13 | * Clear the input field.
14 | * Do not add empty tasks.
15 | * Each task should display with a **Delete** button.
16 |
17 | * Clicking **Delete** removes that task from the list.
18 |
19 | ### Accessibility
20 |
21 | * Use semantic `` and `