Challenges
  • Newest first
  • Oldest first
  • Newest first(All)
  • Oldest first(All)
Results: 180
ID
Sort by Ascending order
Sort by Descending order
Search by "id:text"
Platform
Sort by Ascending order
Sort by Descending order
Search by "platform:text"
Title
Sort by Ascending order
Sort by Descending order
Search by "title:text"
Technology
Sort by Ascending order
Sort by Descending order
Search by "technology:text"
Difficulty
Sort by Ascending order
Sort by Descending order
Search by "difficulty:text"
Description
Sort by Ascending order
Sort by Descending order
Search by "description:text"
Official Solutions
Sort by Ascending order
Sort by Descending order
Search by "solution_urls:text"
YT
Sort by Ascending order
Sort by Descending order
Search by "youtube_link:text"
76 edabit.com Basic E-Mail Validation Problem Solving Easy Create a function that accepts a string, checks if it's a valid email address and returns either true or false, depending on the evaluation. The string must contain an @ character. The string must contain a . character. The @ must have at least one character in front of it. e.g. "e@edabit.com" is valid while "@edabit.com" is invalid. The . and the @ must be in the appropriate places. e.g. "hello.email@com" is invalid while "john.smith@email.com" is valid. If the string passes these tests, it's considered a valid email address. Examples validateEmail("@gmail.com") ➞ false validateEmail("hello.gmail@com") ➞ false validateEmail("gmail") ➞ false validateEmail("hello@gmail") ➞ false validateEmail("hello@edabit.com") ➞ true
75 edabit.com Orthogonal Vector Problem Solving Very easy Create a function that takes two vectors as arrays and checks if the two vectors are orthogonal or not. The return value is boolean. Two vectors a and b are orthogonal if their dot product is equal to zero. Examples isOrthogonal([1, 2], [2, -1]) ➞ true isOrthogonal([3, -1], [7, 5]) ➞ false isOrthogonal([1, 2, 0], [2, -1, 10]) ➞ true
74 edabit.com Find the Discount Problem Solving Very easy Given an array of women and an array of men, either: Return "sizes don't match" if the two arrays have different sizes. If the sizes match, return an array of pairs, with the first woman paired with the first man, second woman paired with the second man, etc. Examples zipIt(["Elise", "Mary"], ["John", "Rick"]) ➞ [["Elise", "John"], ["Mary", "Rick"]] zipIt(["Ana", "Amy", "Lisa"], ["Bob", "Josh"]) ➞ "sizes don't match" zipIt(["Ana", "Amy", "Lisa"], ["Bob", "Josh", "Tim"]) ➞ [["Ana", "Bob"], ["Amy", "Josh"],["Lisa", "Tim"]]
72 edabit.com Is the Word an Isogram? Problem Solving Very easy Is the Word an Isogram? An isogram is a word that has no duplicate letters. Create a function that takes a string and returns either true or false depending on whether or not it's an "isogram". Examples isIsogram("Algorism") ➞ true isIsogram("PasSword") ➞ false // Not case sensitive. isIsogram("Consecutive") ➞ false
8 edabit.com Fix the Spacing Problem Solving Easy Additional spaces have been added to a sentence. Return the correct sentence by removing them. All words should be separated by one space, and there should be no spaces at the beginning or end of the sentence. Examples correctSpacing("The film starts at midnight. ") ➞ "The film starts at midnight." correctSpacing("The waves were crashing on the shore. ") ➞ "The waves were crashing on the shore." correctSpacing(" Always look on the bright side of life.") ➞ "Always look on the bright side of life."
83 edabit.com Valid Hex Code Problem Solving Very easy Create a function that determines whether a string is a valid hex code. A hex code must begin with a pound key # and is exactly 6 characters in length. Each character must be a digit from 0-9 or an alphabetic character from A-F. All alphabetic characters may be uppercase or lowercase. Examples isValidHexCode("#CD5C5C") ➞ true isValidHexCode("#EAECEE") ➞ true isValidHexCode("#eaecee") ➞ true isValidHexCode("#CD5C58C") ➞ false // Length exceeds 6 isValidHexCode("#CD5C5Z") ➞ false // Not all alphabetic characters in A-F isValidHexCode("#CD5C&C") ➞ false // Contains unacceptable character isValidHexCode("CD5C5C") ➞ false // Missing #
82 edabit.com Special Arrays Problem Solving Very easy An array is special if every even index contains an even number and every odd index contains an odd number. Create a function that returns true if an array is special, and false otherwise. Examples isSpecialArray([2, 7, 4, 9, 6, 1, 6, 3]) ➞ true // Even indices: [2, 4, 6, 6]; Odd indices: [7, 9, 1, 3] isSpecialArray([2, 7, 9, 1, 6, 1, 6, 3]) ➞ false // Index 2 has an odd number 9. isSpecialArray([2, 7, 8, 8, 6, 1, 6, 3]) ➞ false // Index 3 has an even number 8.
81 edabit.com Split Item Codes Problem Solving Very easy You have an array of item codes with the following format: "[letters][digits]" Create a function that splits these strings into their alphabetic and numeric parts. Examples splitCode("TEWA8392") ➞ ["TEWA", 8392] splitCode("MMU778") ➞ ["MMU", 778] splitCode("SRPE5532") ➞ ["SRPE", 5532]
80 edabit.com Rock, Paper, Scissors Problem Solving Very easy Create a function which takes two strings (p1 and p2 ⁠— which represent player 1 and 2) as arguments and returns a string stating the winner in a game of Rock, Paper, Scissors. Each argument will contain a single string: "Rock", "Paper", or "Scissors". Return the winner according to the following rules: Rock beats Scissors Scissors beats Paper Paper beats Rock If p1 wins, return the string "The winner is p1". If p2 wins, return the string "The winner is p2" and if p1 and p2 are the same, return "It's a draw". Examples rps("Rock", "Paper") ➞ "The winner is p2" rps("Scissors", "Paper") ➞ "The winner is p1" rps("Paper", "Paper") ➞ "It's a draw"
79 edabit.com Get the Century Problem Solving Very easy Create a function that takes in a year and returns the correct century. Examples century(1756) ➞ "18th century" century(1555) ➞ "16th century" century(1000) ➞ "10th century" century(1001) ➞ "11th century" century(2005) ➞ "21st century"
Results: 180