Skip to content

This repository contains a collection of interview coding questions designed to help prepare for interviews and improve problem-solving skills. It covers a variety of projects and problems covering topics such as Pascal's triangle, lockboxes, minimum operations, log parsing, UTF-8 validation, N queens, Star Wars API, and rotating 2D matrices.

Notifications You must be signed in to change notification settings

Josh-techie/alx-interview

Repository files navigation


Interview Coding Questions - ALX

  • In this section, you will find a collection of interview coding questions specifically tailored for ALX. These questions cover various topics and are designed to help you prepare for interviews, improve your problem-solving skills, and enhance your understanding of algorithms and programming concepts.

    Feel free to explore the questions, work on the solutions, and contribute to the repository. Good luck with your preparation!


Table of Contents

  • 0x00-pascal_triangle

    • Create a function def pascal_triangle(n): that returns a list of lists of integers representing the Pascal’s triangle of n.
  • 0x01-lockboxes

    • Implement a Python function def canUnlockAll(boxes): to determine if all the locked boxes can be opened. Given a list of locked boxes, each containing keys to other boxes, the function checks whether it's possible to open all the boxes. Return True if all boxes can be opened, and False otherwise.
  • 0x02-minimum_operations

    • Implement minOperations(n) in 0-minoperations.py, which calculates the minimum operations to obtain n 'H' characters using a text editor capable of Copy All and Paste. Return the minimum number of operations or 0 if it's impossible.
  • 0x03-log_parsing

    • Implement a log parsing script in Python. The goal is to read input from standard input (stdin) line by line, processing the data, and calculating various metrics. The input format involves lines containing IP addresses, dates, HTTP requests, status codes, and file sizes. The script prints statistics after every 10 lines or upon a keyboard interruption (CTRL + C).
  • 0x04-utf8_validation

    • It involves the implementation of a Python script creating a method, validUTF8(data), the method overall checks whether a given data set is a valid UTF-8 encoding or not.
  • 0x05-nqueens

    • Implement a Python program 0-nqueens.py that solves the N queens puzzle. The program takes an integer N (≥4) as a command-line argument and prints all non-attacking queen placements on an N×N chessboard. If input is incorrect, appropriate error messages are displayed. The solution format is a list of queen positions for each valid configuration. The program adheres to specified requirements, using only the sys module for imports.
  • 0x06-starwars_api

    • Implement a JavaScript script 0-starwars_characters.js for the Star Wars Characters project. The script interacts with the Star Wars API to fetch and print character names from a specified movie ID passed as a command-line argument. The characters are displayed in the same order as the characters list in the /films/ endpoint. The script adheres to specified requirements, using the request module for HTTP requests and following semistandard JavaScript style.
  • 0x07-rotate_2d_matrix

    • Implement a Python script 0-rotate_2d_matrix.py for the Rotate 2D Matrix project. The script uses an in-place algorithm to rotate an n x n 2D matrix by 90 degrees clockwise. It adheres to specified requirements, including pycodestyle for style compliance, no external module imports, and proper documentation. The script takes a 2D matrix as input, rotates it in-place, and does not return anything. Test cases in main_0.py validate the correctness of the rotation algorithm.

Contributing

⭐ If you find these coding problems useful in your journey of software engineer, please consider giving me a star on GitHub! Your support helps me continue to innovate and share.

If you have a new coding question to add or if you find any issues with existing questions, please feel free to contribute by opening an issue, and don't forget to follow me on my github Josh-Techie


Author

  • @Josh-techie | Software Engineer Student

    Reach out to me if you need any help or have any questions.

    Feel free to contact me | Linkedin Profile | Twitter Profile

About

This repository contains a collection of interview coding questions designed to help prepare for interviews and improve problem-solving skills. It covers a variety of projects and problems covering topics such as Pascal's triangle, lockboxes, minimum operations, log parsing, UTF-8 validation, N queens, Star Wars API, and rotating 2D matrices.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published