1. Palindrome

C

C

C is a general-purpose, imperative computer programming language, that supports structured programming, lexical variable scope and recursion. Having a basic familiarity with the programming language used on the job is a prerequisite for quickly getting up to speed.

Strings

Strings

The string data structure is used to represent text. It is one of the most commonly used data structures. Therefore, every programmer should be skilled at string manipulation.

Public

Public

Public questions (free account) are common interview questions. They are great for practicing, or if you want to filter candidates using the classic problems.

A palindrome is a word that reads the same backward or forward.

Write a function that checks if a given word is a palindrome. Character case should be ignored. If the given word is a palindrome, the function should return 1; otherwise it should return 0.

For example, is_palindrome("Deleveled") should return 1 as character case should be ignored resulting with "deleveled" which is a palindrome since it reads same backward and forward.

2. Watched Videos

C

C

C is a general-purpose, imperative computer programming language, that supports structured programming, lexical variable scope and recursion. Having a basic familiarity with the programming language used on the job is a prerequisite for quickly getting up to speed.

Arrays

Arrays

An array is a container of a fixed number of objects of a similar type. It is a fundamental component of most programming languages.

Public

Public

Public questions (free account) are common interview questions. They are great for practicing, or if you want to filter candidates using the classic problems.

New

New

This is a part of latest question addition to our question library.

Implement the count_views function. It accepts an array of pointers to the Viewer struct, the size of the array, and the character array with the video name. It should return the number of Viewers who have watched a Video with the name video_name.

3. Words

C

C

C is a general-purpose, imperative computer programming language, that supports structured programming, lexical variable scope and recursion. Having a basic familiarity with the programming language used on the job is a prerequisite for quickly getting up to speed.

Algorithmic thinking

Algorithmic thinking

When designing and/or analyzing an algorithm or data structure, it is important to consider the performance and structure of an implementation. Algorithmic thinking is one of the key traits of a good programmer, especially one working on complex or performance-critical code.

Sorting

Sorting

Every programmer should be familiar with data-sorting methods, as sorting is very common in data-analysis processes.

Public

Public

Public questions (free account) are common interview questions. They are great for practicing, or if you want to filter candidates using the classic problems.

Implement function sort_words that sorts an array of words that contain lowercase characters from english alphabet, in descending order, and is efficient with respect to time used.

4. Binary Search Tree

C

C

C is a general-purpose, imperative computer programming language, that supports structured programming, lexical variable scope and recursion. Having a basic familiarity with the programming language used on the job is a prerequisite for quickly getting up to speed.

Algorithmic thinking

Algorithmic thinking

When designing and/or analyzing an algorithm or data structure, it is important to consider the performance and structure of an implementation. Algorithmic thinking is one of the key traits of a good programmer, especially one working on complex or performance-critical code.

Data structures

Data structures

Choosing the right data structure to solve a problem can have huge implications on the performance of an application. Knowing when to use a specific data structure is one of the most important skills for a programmer.

Public

Public

Public questions (free account) are common interview questions. They are great for practicing, or if you want to filter candidates using the classic problems.

Binary search tree (BST) is a binary tree where the value of each node is larger or equal to the values in all the nodes in that node's left subtree and smaller than the values in all the nodes in that node's right subtree.

Write a function that, efficiently with respect to time used, returns 1 if a given binary search tree contains a given value, else 0.

For example, for the following tree:

n1 (Value: 1, Left: null, Right: null)

n2 (Value: 2, Left: n1, Right: n3)

n3 (Value: 3, Left: null, Right: null)

Call to contains(&n2, 3) should return 1 since a tree with root at n2 contains number 3.

5. Inspect Bits

C

C

C is a general-purpose, imperative computer programming language, that supports structured programming, lexical variable scope and recursion. Having a basic familiarity with the programming language used on the job is a prerequisite for quickly getting up to speed.

Bit manipulation

Bit manipulation

Low-level programming tasks, such as data compression, error detection and device control, often require manipulation of the bits that make up the data, which is an important skill for any programmer working on low-level data processing.

Public

Public

Public questions (free account) are common interview questions. They are great for practicing, or if you want to filter candidates using the classic problems.

Implement the inspect_bits function that checks if given number contains 2 or more consecutive ones in its binary representation. If it does, the function should return 1. Otherwise, it should return 0.

For example, inspect_bits(13) should return 1 as it contains 2 consecutive ones in its binary representation (1101).