Skip to content

At ALX Holberton School of Software Engineering, specific questions/tasks are treated as interview prep tasks, these tasks are proven and can potentially be interview questions in the future while job hunting. This repository contains many of such prep tasks.

License

Notifications You must be signed in to change notification settings

TosinISOGUN/technical_interview_preparation

Repository files navigation

Technical Interview Preparation

Synopsis

At ALX Holberton School of Software Engineering, specific questions/tasks are treated as interview prep tasks, these tasks are proven and can potentially be interview questions in the future while job hunting. This repository contains many of such prep tasks.

File Contents

  • Question;

Write a function in C that checks if a singly linked list has a cycle in it.

  • Prototype: int check_cycle(listint_t *list);
  • Return: 0 if there is no cycle, 1 if there is a cycle.

Requirements:

Only these functions are allowed: write, printf, putchar, puts, malloc, free.

Answer can be found in the file therein!

  • Question;

Write a function in C that inserts a number into a sorted singly linked list.

  • Prototype: listint_t *insert_node(listint_t **head, int number);
  • Return: the address of the new node, or NULL if it failed.

Answer can be found in the file therein!

  • Question;

Write a function in C that checks if a singly linked list is a palindrome.

  • Prototype: int is_palindrome(listint_t **head);
  • Return: 0 if it is not a palindrome, 1 if it is a palindrome.
  • An empty list is considered a palindrome.

Answer can be found in the file therein!

  • Question;

Create a Python function def pascal_triangle(n): that returns a list of lists of integers representing the Pascal’s triangle of n:

  • Returns an empty list if n <= 0.
  • You can assume n will be always an integer.
  • You are not allowed to import any module.

Answer can be found in the file therein!

Filename; lists.h

The lists.h file is a header file which contains all the standard and custom function prototypes used in solving C programming related interview prep tasks.

Credits & Authors

About

At ALX Holberton School of Software Engineering, specific questions/tasks are treated as interview prep tasks, these tasks are proven and can potentially be interview questions in the future while job hunting. This repository contains many of such prep tasks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published