Unique Bid Auction
There is a game called "Unique Bid Auction". You can read more about it here
Read more →There is a game called "Unique Bid Auction". You can read more about it here
Read more →A path in a binary tree is a sequence of nodes where each pair of adjacent nodes in the sequence has an edge connecting them
Read more →Chef has an array A of length N consisting of 1−1 only.
Read more →Katie, Kuro and Shiro are best friends. They have known each other since kindergarten
Read more →Given two integer arrays preorder and inorder where preorder is the preorder traversal of a binary tree
Read more →Chef goes to the supermarket to buy some items. Luckily there's a sale going on under which Chef gets the following offer
Read more →Given the root of a binary tree, return the most frequent subtree sum. If there is a tie, return all the values with the highest frequency in any order.
Read more →Chef has just started Programming,
Read more →Ivan has number b He is sorting through the numbers a from 1
Read more →In Summer Informatics School, if a student doesn't behave well, teachers make a hole in his badge. And today one of the teachers caught a group of n students
Read more →Given the root of a binary tree, return the zigzag level order traversal of its nodes' values. (i.e., from left to right, then right to left for the next level
Read more →Chef is standing at coordinate A while Chefina is standing at coordinate B.
Read more →You are given an array prices where prices[i] is the price of a given stock on the ith day, and an integer fee representing a transaction fee.
Read more →QAQ" is a word to denote an expression of crying. Imagine "Q" as eyes with tears and "A" as a mouth.
Read more →Gru has not been in the limelight for a long time and is, therefore, planning something particularly nefarious. Frustrated by his minions' incapability.
Read more →Where do odds begin, and where do they end? Where does hope emerge, and will they ever break?
Read more →An ugly number is a positive integer whose prime factors are limited to 2, 3, and 5.
Read more →the team gets to play 6 times, and in each of these 6 tries, they can score a maximum of 6 runs.
Read more →Ivan is collecting coins. There are only N different collectible coins, Ivan has K of them
Read more →Given an integer n, return true if it is a power of four. Otherwise, return false.
Read more →There are N spooky days left until Halloween.
Read more →There is an integer array nums sorted in ascending order (with distinct values).
Read more →Life is a like a box of of mozzarella sticks. You never know what you're gonna get.
Read more →Aki is fond of numbers, especially those with trailing zeros
Read more →It must print the values in the tree's preorder traversal as a single line of space-separated values.
Read more →Given two integers dividend and divisor, divide two integers without using multiplication, division, and mod operator.
Read more →Chef has fallen in love with Cheffina, and wants to buy N gifts for her
Read more →Complete the function in the editor below. It received parameter: a pointer to the root of a binary tree. It must print the values in the tree's postorder.
Read more →A monster is chasing after Rick and Morty on another planet. They're so frightened that sometimes they scream
Read more →The Hamming distance between two integers is the number of positions at which the corresponding bits are different.
Read more →The National Championships are starting soon. There are 4 race categories.
Read more →Given a pointer to the root of a binary tree, you need to print the level order traversal of this tree
Read more →Okabe needs bananas for one of his experiments for some strange reason. So he decides to go to the forest and cut banana trees.
Read more →Given an integer n, return the nth digit of the infinite integer sequence [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...].
Read more →All of Chef's friends are playing fantasy cricket based upon the ODI World Cup, and Chef would like to join them.
Read more →Given an integer n, return the number of trailing zeroes in n.
Read more →Two friends Chef and Chefina are currently on floors A and B respectively.
Read more →Chef bought N items from a shop. Although it is hard to carry all these items in hand, so Chef has to buy some polybags to store these items.
Read more →In this challenge, you are required to implement inorder traversal of a tree.
Read more →For simplicity, we'll assume that there are only three types of grapes: green grapes, purple grapes and black grapes.
Read more →There are n rooms labeled from 0 to n 1 and all the rooms are locked except for room
Read more →Chouti was doing a competitive programming competition.
Read more →The height of a binary tree is the number of edges between the tree's root and its furthest leaf.
Read more →Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
Read more →Elections are taking place in Berland. There are n candidates participating in the elections, numbered from 1 to n
Read more →Read problem statements in Mandarin Chinese, Russian, and Vietnamese as well.
Read more →It is known that Chef requires X minutes to solve Problem A correctly and Y minutes to solve Problem B correctly.
Read more →A valid IP address consists of exactly four integers separated by single dots. Each integer is between.
Read more →You are given a pointer to the root of a binary search tree and values to be inserted into the tree.
Read more →You have n coins, each of the same value of 1.
Read more →An airline operates X aircraft every day. Each aircraft can carry up to 100 passengers.
Read more →Given an integer column Number, return its corresponding column title as it appears in an Excel sheet.
Read more →Chef and Chefina are residing in a hotel.
Read more →Given the root of a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.
Read more →You have an empty sequence, and you will be given queries. Each query is one of these three types.
Read more →Alex, Bob and Carl will soon participate in a team chess tournament.
Read more →Given a reference to the head of a doubly-linked list and an integer.
Read more →The given points are vertices of a plot of a piecewise function. The j-th piece of the function is the segment PjPj+1
Read more →In this problem, a tree is an undirected graph that is connected and has no cycles.
Read more →Chef is a very big fan of Eren Yeager.
Read more →This exercise focuses on traversing a linked list.
Read more →In Berland, there are two types of coins, having denominations of 2and k burles
Read more →You are implementing a program to use as your calendar. We can add a new event if adding the event will not cause a double booking.
Read more →As you could know there are no male planes nor female planes. However
Read more →Given the pointer to the head node of a linked list, change the next pointers of the nodes so that their order is reversed.
Read more →Given a rows x cols binary matrix filled with 0's and 1's, find the largest rectangle containing
Read more →Alice and Bob are playing a game of table tennis where irrespective of the point scored.
Read more →You are given the pointer to the head node of a linked list and an integer to add to the list.
Read more →There are n benches in the Berland Central park. It is known that a people are currently sitting on the bench
Read more →Given an unsorted integer array nums. Return the smallest positive integer that is not present in nums.
Read more →Chef is playing a variant of Blackjack, where 3 numbers are drawn and each number lies between
Read more →Given a pointer to the head of a linked list, insert a new node before the head
Read more →Recently, he found a machine that can clone plush toys
Read more →Given the root of a binary tree, determine if it is a valid binary search tree (BST).
Read more →Alice has recently started playing Chess. Her current rating is X. She noticed that when she wins a game, her rating increases by 8 points.
Read more →Given pointers to the head nodes of linked lists that merge together at some point.
Read more →As you may know, MemSQL has American offices in both San Francisco and Seattle
Read more →Given a string expression of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators.
Read more →You are given the sequence of Nucleotides of one strand of DNA through a string
Read more →You are given a chessboard of size n×n It is filled with numbers from 1 to n2
Read more →Given a pointer to the head of a singly-linked list, print each value from the reversed list. If the given list is empty, do not print anything.
Read more →Given the root of a binary search tree (BST) with duplicates, return all the mode(s) (i.e., the most frequently occurred element) in it.
Read more →Mario's bullet moves at X pixels per frame. He wishes to shoot a goomba standing Y pixels away from him. The goomba does not move.
Read more →You are given n chips on a number line. The i-th chip is placed at the integer coordinate
Read more →Chef discovered that his secret recipe has been stolen. He immediately informs the police of the theft.
Read more →Given a non-empty special binary tree consisting of nodes with the non-negative value.
Read more →There was an electronic store heist last night.
Read more →Given the root of a binary tree, return the level order traversal of its nodes' values. (i.e., from left to right, level by level).
Read more →Mario transforms each time he eats a mushroom as follows
Read more →You are given the pointer to the head node of a sorted linked list, where the data in the nodes is in ascending order.
Read more →Little girl Tanya is learning how to decrease a number by one
Read more →Chef is making a dish that consists of exactly two ingredients. He has four ingredients.
Read more →Given the root of a binary search tree and the lowest and highest boundaries as low and high
Read more →Let's define a split of n as a nonincreasing sequence of positive integers, the sum of which is n
Read more →You are given an integer array nums with no duplicates. A maximum binary tree can be built recursively from nums using the following algorithm.
Read more →There is a bus with 30 seats. The seats are numbered from 1 to 30, and the numbering is as depicted in this image.
Read more →There is a beautiful garden of stones in Innopolis.
Read more →Given the root of a binary tree, the depth of each node is the shortest distance to the root.
Read more →Chef hosts a party for his birthday. There are N people at the party. All these N people decide to play Jenga.
Read more →A bracket is considered to be any one of the following characters: (, ), {, }, [, or ].
Read more →Katie, Kuro and Shiro are best friends. They have known each other since kindergarten
Read more →Given the root of a binary tree, return an array of the largest value in each row of the tree (0-indexed).
Read more →There are N children and Chef wants to give them1 candy each. Chef already has X
Read more →While sailing on a boat, Inessa noticed a beautiful water lily flower above the lake's surface
Read more →Given a pointer to the head node of a linked list and an integer to insert at a certain position
Read more →You are given the root of a binary tree containing digits from 0 to 9 only.
Read more →A problem setter is called an expert if at least 50% of their problems are approved by Chef.
Read more →There is a house with n flats situated on the main street of Berlatov.
Read more →Given the roots of two binary trees root and subRoot, return true if there is a subtree of root with the same structure and node values of subRoot and false.
Read more →Chef has three water bottles. At any point, if at least two of them are empty.
Read more →Mishka got a six-faced dice. It has integer numbers from 2 to 7 written on its faces
Read more →Delete the node at a given position in a linked list and return a reference to the head node
Read more →Bob is a noob mathematician and he is not very comfortable with addition of numbers
Read more →Given the root of a binary search tree, and an integer k, return the kth smallest value (1-indexed) of all the values of the nodes in the tree.
Read more →In Chefland, there are X schools, and each school has Y students.
Read more →You can not just take the file and send it. When Polycarp trying to send a file in the social network.
Read more →Devendra just had a million-dollar idea and he needs funds to startup. He was recently invited to Sasta Shark Tank (A TV show where entrepreneurs pitch.
Read more →Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of the BST.
Read more →You are given an N-sided regular polygon. You have connected the center of the polygon with all the vertices, thus dividing the polygon into N equal parts.
Read more →Polycarp has n coins, the value of coin is Polycarp wants to distribute all the coins between his pockets
Read more →A linked list is said to contain a cycle if any node is visited more than once while traversing the list.
Read more →Given the root of a binary tree, return the postorder traversal of its nodes' values.
Read more →N teams have come to participate in a competitive coding event called “Binary Battles
Read more →Alice and Bob want to buy firecrackers. There are types of firecrackers available in the market
Read more →Given a pointer to the head of a linked list and a specific position, determine the data value at that position
Read more →Alice and Bob are decorating a Christmas Tree.
Read more →Given the root of a binary tree, return the length of the longest path, where each node in the path has the same value. This path may or may not pass through.
Read more →It is the World Cup Finals. Chef only finds a match interesting if the skill difference of the competing teams is less than or equal to D.
Read more →k people want to split n candies between them. Each candy should be given to exactly one of them or be thrown away.
Read more →You’re given the pointer to the head nodes of two linked lists. Compare the data in the nodes of the linked lists to check if they are equal. If all data.
Read more →A binary tree is uni-valued if every node in the tree has the same value.
Read more →CodeChef recently revamped its practice page to make it easier for users to identify the next problems they should solve by introducing some new features.
Read more →Given the pointer to the head node of a doubly linked list, reverse the order of the nodes in place.
Read more →Maxim wants to buy an apartment in a new house at Line Avenue of Metropolis.
Read more →Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.
Read more →Chef has infinite coins in denominations of rupees 5 and rupees 10.
Read more →Mishka got an integer array a of length n as a birthday present (what a surprise!).
Read more →Write a program to find the factorial value of any number entered by the user.
Read more →Given a 2D array, an hourglass is a subset of values with indices falling in the following pattern
Read more →Given an integer array nums where the elements are sorted in ascending order, convert it to a height-balanced binary search tree.
Read more →Polycarp has created his own training plan to prepare for the programming contests. He will train for n days, all days are numbered from 1 to n beginning
Read more →An array is a data structure that stores elements of the same type in a contiguous block of memory
Read more →Given the root of a binary tree, return all root-to-leaf paths in any order.
Read more →Chef is currently standing at stair 0 and he wants to reach stair numbered X.
Read more →Consider an undirected graph where each edge weighs 6 units. Each of the nodes is labeled consecutively from 1
Read more →A few years ago Sajjad left his school and register to another one due to security reasons. Now he wishes to find Amir, one of his schoolmates and good friends.
Read more →Given the root of a binary tree, return the leftmost value in the last row of the tree.
Read more →Three numbers A, B and C are the inputs. Write a program to find second largest among them.
Read more →Chef received N candies on his birthday. He wants to put these candies in some bags. A bag has K pockets and each pocket can hold at most M candies
Read more →Imp is in a magic forest, where xorangles grow (wut?)
Read more →Given the root of a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus the sum.
Read more →Recently Luba learned about a special kind of numbers that she calls beautiful numbers.
Read more →We define a magic square to be an matrix of distinct positive integers from to where the sum of any row, column, or diagonal of length is always equal
Read more →Given the root of a binary tree, return the length of the diameter of the tree.
Read more →Each referee has to point out whether he considers the ball to be inside limits or outside limits. The ball is considered to be IN if and only if all the.
Read more →To make a paper airplane, one has to use a rectangular piece of paper. From a sheet of standard size you can make s airplanes.
Read more →The distance between two array values is the number of indices between them. Given , find the minimum distance between any pair of equal elements in the array.
Read more →Given a binary tree, find its minimum depth.
Read more →The game of billiards involves two players knocking 3 balls around on a green baize table. Well, there is more to it, but for our purposes this is sufficient.
Read more →Mikhail walks on a 2D plane. He can go either up or right. You are given a sequence of Mikhail's moves. He thinks that this sequence is too long and he wants.
Read more →Given the root of a binary tree, return the inorder traversal of its nodes' values.
Read more →In a coding contest, there are two types of problems
Read more →Anton has the integer x. He is interested what positive integer, which doesn't exceed x, has the maximum sum of digits.
Read more →Given the roots of two binary trees p and q, write a function to check if they are the same or not.
Read more →Chef is struggling to pass a certain college course.
Read more →Given the time in numerals we may convert it into words, as shown below
Read more →Let's define a split of n as a nonincreasing sequence of positive integers, the sum of which is n
Read more →Given the root of a binary tree and an integer targetSum, return true if the tree has a root-to-leaf path.
Read more →After the phenomenal success of the 36th Chamber of Shaolin, San Te has decided to start 37th Chamber of Shaolin. The aim this time is to equip women
Read more →Allen has a LOT of money. He has n dollars in the bank
Read more →A driver is driving on the freeway. The check engine light of his vehicle is on, and the driver wants to get service immediately.
Read more →Given the root of a binary tree, return its maximum depth.
Read more →Chef started watching a movie that runs for a total of X minutes.
Read more →It seems that Borya is seriously sick. He is going visit n doctors to find out the exact diagnosis
Read more →Given a binary tree, determine if it is height-balanced.
Read more →Write a program to obtain a number N and increment its value by 1 if the number is divisible by 4 otherwise decrement its value by 1.
Read more →Mahmoud and Ehab play a game called the even-odd game. Ehab chooses his favorite integer n and then they take turns
Read more →You are choreographing a circus show with various animals. For one act, you are given two kangaroos on a number line ready to jump in the positive direction.
Read more →An n-bit gray code sequence is a sequence of 2n integers where:
Read more →Chef has N empty bottles where each bottle has a capacity of X litres.
Read more →Three friends gathered to play a few games of chess together
Read more →Given an array of integers, where all elements but one occur twice, find the unique element.
Read more →Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order.
Read more →Chef has N candies. He has to distribute them to exactly M of his friends such that each friend gets equal number of candies and each friend gets even num.
Read more →Mister B once received a gift: it was a book about aliens, which he started read immediately. This book had c pages.
Read more →The absolute difference is the positive difference between two values is written
Read more →The Chessboard Distance for any two points.
Read more →Given an array of distinct integers candidates and a target integer target.
Read more →Each student eagerly awaits the day he would pass the exams successfully
Read more →Chef is playing with weights. He has an object weighing W units.
Read more →Given a non-negative integer c, decide whether there're two integers a and b such that a2 + b2 = c.
Read more →Dima has a hamsters farm. Soon N hamsters will grow up on it and Dima will sell them in a city nearby.
Read more →Many of the challenges on HackerRank are difficult and assume that you already know the relevant algorithms.
Read more →An ugly number is a positive integer which does not have a prime factor other than 2, 3, and 5.
Read more →Alice is driving from her home to her office which is A kilometers away and will take her X hours to reach.
Read more →Petya is a big fan of mathematics, especially its part related to fractions.
Read more →In a previous challenge you implemented the Insertion Sort algorithm. It is a simple sorting algorithm that works well with small or mostly sorted data.
Read more →Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Read more →Chef is setting up a perfect bath for himself. He has X litres of hot water and Y litres of cold water.
Read more →There is a large pile of socks that must be paired by color. Given an array of integers representing the color of each sock, determine how many pairs of socks.
Read more →In the army, it isn't easy to form a group of soldiers that will be effective on the battlefield. The communication is crucial and thus no two soldiers should
Read more →You are given an array of people, people, which are the attributes of some people in a queue (not necessarily in order)
Read more →Chef is playing a videogame, and is getting close to the end. He decides to finish the rest of the game in a single session.
Read more →Kirill plays a new computer game. He came to the potion store where he can buy any potion. Each potion is characterized by two integers
Read more →You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maximum jump length.
Read more →In olden days finding square roots seemed to be difficult but nowadays it can be easily done using in-built functions available across many languages
Read more →Two children, Lily and Ron, want to share a chocolate bar. Each of the squares has an integer on it.
Read more →Kuro is living in a country called Uberland consisting of n towns, numbered from 1 to n and n−1 bidirectional roads connecting these towns
Read more →There are n gas stations along a circular route, where the amount of gas at the ith station is gas[i].
Read more →You are asked to calculate factorials of some small positive integers.
Read more →You will be given a list of 32 bit unsigned integers. Flip all the bits ( and ) and return the result as an unsigned integer.
Read more →Berland Football Cup starts really soon! Commentators from all over the world come to the event.
Read more →Given the head of a linked list, remove the nth node from the end of the list and return its head.
Read more →Chef has N friends. Chef promised that he would gift a pair of shoes (consisting of one left shoe and one right shoe) to each of his N friends
Read more →There is the faculty of Computer Science in Berland. In the social net "TheContact.
Read more →Mark and Jane are very happy after having their first child. Their son loves toys
Read more →A geyser has a capacity of X litres of water and a bucket has a capacity of Y litres of water.
Read more →Given the head of a linked list, rotate the list to the right by k places.
Read more →Marc loves cupcakes, but he also likes to stay fit. Each cupcake has a calorie count, and Marc can walk a distance to expend those calories.
Read more →Mikhail walks on a 2D plane. He can go either up or right. You are given a sequence of Mikhail's moves. He thinks that this sequence is too long and he wants.
Read more →You are given the heads of two sorted linked lists list1 and list2.
Read more →There are N cards on a table, out of which X cards are face-up and the remaining are face-down.
Read more →In Insertion Sort Part 1, you inserted one element into an array at its correct sorted position. Using the same approach repeatedly, can you sort an entire.
Read more →Tavak and Seyyed are good friends. Seyyed is very funny and he told Tavak to solve the following problem instead of longest-path.
Read more →In discus throw, a player is given 3 throws and the throw with the longest distance is regarded as their final score.
Read more →You are playing a simplified PAC-MAN game on an infinite 2-D grid. You start at the point
Read more →There is a sequence of words in CamelCase as a string of letters, s, having the following properties:
Read more →Given an m x n matrix mat, return an array of all the elements of the array in a diagonal order.
Read more →In a test, there are N problems, each carrying X marks.
Read more →One common task for computers is to sort data. For example, people might want to see all their files on a computer sorted by size
Read more →A single car can accommodate at most 4 people.
Read more →Given an integer n, return the least number of perfect square numbers that sum to n.
Read more →You are given k sequences of integers. The length of the i-th sequence equals to ni .
Read more →Given two arrays of integers, find which elements in the second array are missing from the first array.
Read more →In computing, the collection of four bits is called a nibble
Read more →Given two strings word1 and word2, return the minimum number of steps required to make word1 and word2 the same.
Read more →There are three people sitting in a room - Alice, Bob, and Charlie. They need to decide on the temperature to set on the air.
Read more →Given a square grid of characters in the range ascii[a-z], rearrange elements of each row alphabetically, ascending.
Read more →Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence.
Read more →Bran and his older sister Arya are from the same house. Bran like candies so much, so Arya is going to give him some Candies
Read more →We define super digit of an integer using the following rules
Read more →CodeChef recently revamped its practice page to make it easier for users to identify the next problems they should solve by introducing some new features.
Read more →An integer x is a good if after rotating each digit individually by 180 degrees, we get a valid number that is different from x. Each digit must be rotated.
Read more →Bomboslav likes to look out of the window in his room and watch lads outside playing famous shell game.
Read more →You are playing the Bulls and Cows game with your friend.
Read more →You are given a string containing characters A and B only. Your task is to change it into a string such that there are no matching adjacent characters.
Read more →The Chef has reached the finals of the Annual Inter-school Declamation contest.
Read more →In the beginning of the new year Keivan decided to reverse his name. He doesn't like palindromes, so he changed Naviek to Navick.
Read more →There is a robot starting at the position (0, 0), the origin, on a 2D plane. Given a sequence of its moves, judge if this robot ends up at (0, 0).
Read more →You know that 1 kg of pulp can be used to make 1000 pages and 1 notebook consists of 100 pages
Read more →While Alice was drinking sugarcane juice, she started wondering about the following facts
Read more →In this challenge, you will determine whether a string is funny or not. To determine whether a string is funny.
Read more →Two boys decided to compete in text typing on the site "Key races". During the competition, they have to type a text consisting of s characters
Read more →Given two strings s and t, determine if they are isomorphic.
Read more →Given a string s, find the first non-repeating character in it and return its index. If it does not exist, return -1.
Read more →Given a string of lowercase letters in the range ascii[a-z], determine the index of a character that can be removed to make the string a palindrome.
Read more →Chef is currently working for a secret research group called NEXTGEN. While the rest of the world is still in search of a way to utilize Helium.
Read more →Given two version strings, version1 and version2, compare them. A version string consists of revisions separated by dots '.'. The value of the revision.
Read more →Sherlock considers a string to be valid if all characters of the string appear the same number of times.
Read more →It's the sale season again and Chef bought items worth a total of X rupees. The sale season offer is as follows
Read more →Given two non-negative integers, num1 and num2 represented as string, return the sum of num1 and num2 as a string.
Read more →There is the faculty of Computer Science in Berland. In the social net "TheContact!" for each course of this faculty there is the special
Read more →A magical string s consists of only '1' and '2' and obeys the following rules
Read more →Louise joined a social networking site to stay in touch with her friends. The signup page required her to input a name and a password
Read more →Each pizza consists of 4 slices. There are N friends and each friend needs exactly X slices.
Read more →A pangram is a string that contains every letter of the alphabet. Given a sentence determine whether it is a pangram in the English alphabet
Read more →Jon Snow now has to fight with White Walkers. He has n rangers, each of which has his own strength.
Read more →We define the usage of capitals in a word to be right when one of the following cases holds:
Read more →For each bill you pay using CRED, you earn X CRED coins. At CodeChef store, each bag is worth 100 CRED coins.
Read more →We say that a string contains the word hackerrank if a of its characters spell the word hackerrank. Remeber that a subsequence maintains the order of characters
Read more →Young Timofey has a birthday today! He got kit of n cubes as a birthday present from his parents.
Read more →Kattapa, as you all know was one of the greatest warriors of his time
Read more →A binary watch has 4 LEDs on the top to represent the hours (0-11), and 6 LEDs on the bottom to represent the minutes (0-59). Each LED represents a zero or one.
Read more →Recently Chef joined a new company. In this company, the employees have to work for X
Read more →After winning gold and silver in IOI 2014, Akshat and Malvika want to have some fun. Now they are playing a game on a grid made of n horizontal and m vertical.
Read more →Given a string s which consists of lowercase or uppercase letters, return the length of the longest palindrome that can be built with those letters.
Read more →We consider two strings to be anagrams of each other if the first string's letters can be rearranged to form the second string.
Read more →Mahmoud has n line segments, the i-th of them has length ai. Ehab challenged him to use exactly 3 line segments to form a non-degenerate triangle.
Read more →Write a function to find the longest common prefix string amongst an array of strings.
Read more →Janmansh has to submit 3 assignments for Chingari before 10 pm and he starts
Read more →Alef the Frog is in an two-dimensional maze represented as a table.
Read more →A new TV streaming service was recently started in Chefland called the Chef-TV.
Read more →Given two strings a and b, return the minimum number of times you should repeat string a so that string b is a substring of it.
Read more →Young Timofey has a birthday today! He got kit of n cubes as a birthday present from his parents
Read more →Determine whether the average of A and B is strictly greater than C or not?
Read more →David has several containers, each with a number of balls in it. He has just enough containers to sort each type of ball he has into its own container.
Read more →Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
Read more →There are literally dozens of snooker competitions held each year, and team Jinotega
Read more →Valentine's Day is approaching and thus Chef wants to buy some chocolates for someone special.
Read more →Given a set of distinct integers, print the size of a maximal subset of where the sum of any numbers in is not evenly divisible by k.
Read more →The count-and-say sequence is a sequence of digit strings defined by the recursive formula
Read more →Sherlock is currently trying to catch a serial killer who kills a person each day.
Read more →You have two strings of lowercase English letters. You can perform two types of operations on the first string
Read more →Polycarp loves lowercase letters and dislikes uppercase ones. Once he got a string s consisting only of lowercase and uppercase Latin letters.
Read more →Given an array of strings strs, group the anagrams together. You can return the answer in any order.
Read more →Given an Integer N, write a program to reverse it.
Read more →Given an array of integers, determine the minimum number of elements to delete to leave only elements of equal value.
Read more →There are two exits in a bus with 100 seats
Read more →Anton likes to listen to fairy tales, especially when Danik, Anton's best friend, tells them. Right now Danik tells Anton a fairy tale.
Read more →Given two binary strings a and b, return their sum as a binary string.
Read more →The factorial of the integer , written , is defined as
Read more →Comrade Dujikov is busy choosing artists for Timofey's birthday and is recieving calls from Taymyr from Ilia-alpinist.
Read more →Chef is watching a football match. The current score is A
Read more →You are given an array prices where prices[i] is the price of a given stock on the ith day.
Read more →A child is playing a cloud hopping game. In this game, there are sequentially numbered clouds that can be thunderheads or cumulus clouds.
Read more →Little Petya loves presents. His mum bought him two strings of the same size for his birthday
Read more →Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range.
Read more →Chef took an examination two times. In the first attempt, he scored XX marks while in the second attempt he scored YY marks
Read more →There is a string of lowercase English letters that is repeated infinitely many times. Given an integer
Read more →A soldier wants to buy w bananas in the shop. He has to pay k dollars for the first banana.
Read more →There is a rectangular brick wall in front of you with n rows of bricks. The ith row has some number of bricks each of the same height (i.e., one unit)
Read more →There is said to be a monopoly in the market if the profit made by one company is strictly greater than the sum of profits made by all other companies
Read more →Taum is planning to celebrate the birthday of his friend, Diksha. There are two types of gifts that Diksha wants from Taum
Read more →Election season has started in Chefland and the election commission wants to know the count of eligible voters.
Read more →The Hamming distance between two integers is the number of positions at which the corresponding bits are different.
Read more →There are n stones on the table in a row, each of them can be red
Read more →There is a new mobile game that starts with consecutively numbered clouds.
Read more →Watson likes to challenge Sherlock's math ability. He will provide a starting and ending value that describe a range of integers.
Read more →During the break the schoolchildren, boys and girls, formed a queue of n people in the canteen.
Read more →Given an m x n binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area.
Read more →A new e-mail service "Berlandesk" is going to be opened in Berland in the near future
Read more →Chef wants to reach home as soon as possible. He has two options.
Read more →Given an m x n binary matrix mat, return the distance of the nearest 0 for each cell.
Read more →Given an integer n, return the number of prime numbers that are strictly less than n.
Read more →John Watson knows of an operation called a right circular rotation on an array of integers.
Read more →«Polygon» is a system which allows to create programming tasks in a simple and professional way.
Read more →Vasily the Programmer loves romance, so this year he decided to illuminate his room with candles
Read more →A jail has a number of prisoners and a number of treats to pass out to them
Read more →There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1
Read more →There are five people playing a game called "Generosity
Read more →HackerLand Enterprise is adopting a new viral advertising strategy
Read more →Given a positive integer num, return true if num is a perfect square or false otherwise.
Read more →A video player plays a game in which the character competes in a hurdle race.
Read more →Jim is doing his discrete maths homework which requires him to repeatedly calculate nCr(n choose r) for different values of n.
Read more →Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if it were.
Read more →There are n stones on the table in a row, each of them can be red, green or blue
Read more →Given a non-negative integer x, return the square root of x rounded down to the nearest intege.
Read more →Little Petya loves presents. His mum bought him two strings of the same size for his birthday
Read more →The prison of your city has n prisoners. As the prison can't accommodate all of them, the city mayor has decided to transfer c of the prisoners to a prison.
Read more →Implement pow(x, n), which calculates x raised to the power n (i.e., xn).
Read more →You are given n sticks with positive integral length a1,a2
Read more →A sentence is a list of words that are separated by a single space with no leading or trailing spaces
Read more →Given an array of bird sightings where every element represents a bird type id
Read more →There is a robot on an m x n grid. The robot is initially located at the top-left corner.
Read more →Given a triangle array, return the minimum path sum from top to bottom
Read more →A Stack is a linear data structure that follows a particular order in which the operations are performed. The order may be LIFO(Last In First Out).
Read more →A message containing letters from A-Z is being encoded to numbers using the following mapping.
Read more →On an 8×8 grid, some horizontal rows have been painted red, and some vertical columns have been painted blue
Read more →You are given two non-empty linked lists representing two non-negative integers.
Read more →Alice and Bob are playing a game on an array a of n positive integers
Read more →A Discrete Mathematics professor has a class of students. Frustrated with their lack of discipline.
Read more →Given a Tic-Tac-Toe board as a string array board, return true if and only if it is possible to reach
Read more →Given an array of integers and a positive integer , determine the number of pairs where and + is divisible by .
Read more →The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is being repeated exactly k
Read more →Suppose you have n integers labeled 1 through n. A permutation of those n integers.
Read more →Given a string array words, return the maximum value of length(word[i]) * length(word[j])
Read more →You are given an array of integers nums, there is a sliding window of size k.
Read more →A Binary Tree Data Structure is a hierarchical data structure in which each node has at most two children.
Read more →Valera had two bags of potatoes, the first of these bags contains x (x ≥ 1) potatoes.
Read more →Given an integer array nums, find a subarray that has the largest product, and return the product.
Read more →There are a number of people who will be attending ACM-ICPC World Finals.
Read more →Given an integer array nums, you need to find one continuous subarray such that if you only sort this subarray in non-decreasing order.
Read more →One day three best friends Petya, Vasya and Tonya decided to form a team and take part in programming contests.
Read more →The 47th ICPC World Finals 2023 (International Collegiate Programming Contest) was a prestigious global programming competition where top university.
Read more →Bob has a playlist of N songs, each song has a singer associated with it (denoted by an integer)
Read more →After the lessons n groups of schoolchildren went outside and decided to visit Polycarpus to celebrate his birthday. We know that the i-th group consists
Read more →The efficiency and accuracy of algorithms have to be analysed to compare them and choose a specific algorithm for certain scenarios.
Read more →Consider two points, and . We consider the inversion or point reflection, , of point across point to be a rotation of point around . Given sets of points
Read more →Its base and height are both equal to . It is drawn using # symbols and spaces. The last line is not preceded by any spaces.
Read more →You are given an array representing a row of seats where seats[i] = 1 represents a person sitting in the ith seat, and seats[i] = 0 represents that the ith.
Read more →Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any order.
Read more →LeetCode Problem 1. Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.
Read more →the year 1800 was a leap year in the Julian calendar. However, by that time, many countries had already switched to the Gregorian calendar, which did not consid
Read more →