code-problems - Common code and interview problems solved in multiple languages

  •        103

This is my repo full of code problems that I have completed prior to or during an interview, as well as general problem snippets. I hope that all these problems (and solutions) are useful to others for practice and review. Feel free to contribute any solutions and optimisations, and add your own problems that you find as well, as I would love to see them. If you have a problem or solution that's not currently not included, please open an issue or pull request! If you're including new content, please make sure you have permission to publish the content you are adding. Under no circumstance should you copy problems online without a visible license or attributions, or from coding interview websites such as Codility.

https://github.com/blakeembrey/code-problems

Tags
Implementation
License
Platform

   




Related Projects

Interview_Problems - Example coding interview problems found through online resources, Cracking the Code book, mentors and colleagues

  •    Python

Repository of example coding interview problems found through online resources, Cracking the Code book, mentors and colleagues. Originally, the repository held Python based answers but based on demand, it has been restructured to include answers to these problems in other languages.

DataStructureAndAlgorithms - Write code that run faster, use less memory and prepare for your Job Interview

  •    Java

In this course you will learn how to Analysis algorithms like Sorting, Searching, and Graph algorithms. And how to reduce the code complexity from one Big-O level to another level. Furthermore, you will learn different type of Data Structure for your code. Also you will learn how to find Big-O for every data structure, and how to apply correct Data Structure to your problem in Java. By the end you will be able to write code that run faster and use low memory. You Also will learn how to analysis problems using Dynamic programming.

Alibaba-Java-Coding-Guidelines - Gitbook for AJCG

  •    

We are pleased to present Alibaba Java Coding Guidelines, which consolidates the best programming practices over the years from Alibaba Group's technical teams. A vast number of Java programming teams impose demanding requirements on code quality across projects as we encourage reuse and better understanding of each other's programs. We have seen many programming problems in the past. For example, defective database table structures and index designs may cause software architecture flaws and performance risks. Yet as another example, confusing code structures make it difficult to maintain. Furthermore, vulnerable code without authentication is prone to hackers’ attacks. To address those kinds of problems, we developed this document for Java developers in Alibaba.This document is consisted of five parts: Programming Specification, Exception and Logs, MySQL Specification, Project Specification and Security Specification. Based on the severity of the concerns, each specification is classified into three levels: Mandatory, Recommended and Reference. Further clarification is expressed in: (1) "Description", which explains the content; (2) "Positive examples", which describe recommended coding and implementation approaches; (3) "Counter examples", which describe precautions and actual error cases.

p3c - Alibaba Java Coding Guidelines pmd implements and IDE plugin

  •    Kotlin

We are pleased to present Alibaba Java Coding Guidelines, which consolidates the best programming practices over the years from Alibaba Group's technical teams. A vast number of Java programming teams impose demanding requirements on code quality across projects as we encourage reuse and better understanding of each other's programs. We have seen many programming problems in the past. For example, defective database table structures and index designs may cause software architecture flaws and performance risks. Yet as another example, confusing code structures make it difficult to maintain. Furthermore, vulnerable code without authentication is prone to hackers’ attacks. To address those kinds of problems, we developed this document for Java developers in Alibaba.[Mandatory] Using a deprecated class or method is prohibited. Note: For example, decode(String source, String encode) should be used instead of the deprecated method decode(String encodeStr). Once an interface has been deprecated, the interface provider has the obligation to provide a new one. At the same time, client programmers have the obligation to check out what its new implementation is.

vscode-leetcode - Solve LeetCode problems in VS Code

  •    TypeScript

Solve LeetCode problems in VS Code. NOTE: Please make sure that Node is in your PATH environment variable. You can check this by running: node -v.


algorithms_and_data_structures - 180+ Algorithm & Data Structure Problems using C++

  •    C++

Note: Some of the code here is old and was written when I was learning C++. It might be possible that code is not safe or making wrong assumptions. Please use with caution. Pull requests are always welcome. Include contains single header implementation of data structures and some algorithms.

LeetCode-Sol-Res - Clean, Understandable Solutions and Resources for LeetCode Online Judge Algorithm Problems

  •    Java

This repository contains solutions and resources for LeetCode algorithm problems. An excel table for quick review before interview is also provided in resources directory.

the-coding-interview - Programming exercises, code katas and puzzles for your job interview training - or just for fun

  •    Python

I honestly did not expect the big amount of interest in the project. I should clean up a bit more... Anyway, the main purpose is doing some fun programming workouts from time to time to stay in shape. The awesome title image was Designed by Freepik.

g2o - g2o: A General Framework for Graph Optimization

  •    C++

g2o is an open-source C++ framework for optimizing graph-based nonlinear error functions. g2o has been designed to be easily extensible to a wide range of problems and a new problem typically can be specified in a few lines of code. The current implementation provides solutions to several variants of SLAM and BA. A wide range of problems in robotics as well as in computer-vision involve the minimization of a non-linear error function that can be represented as a graph. Typical instances are simultaneous localization and mapping (SLAM) or bundle adjustment (BA). The overall goal in these problems is to find the configuration of parameters or state variables that maximally explain a set of measurements affected by Gaussian noise. g2o is an open-source C++ framework for such nonlinear least squares problems. g2o has been designed to be easily extensible to a wide range of problems and a new problem typically can be specified in a few lines of code. The current implementation provides solutions to several variants of SLAM and BA. g2o offers a performance comparable to implementations of state-of-the-art approaches for the specific problems (02/2011).

RLSeq2Seq - Deep Reinforcement Learning For Sequence to Sequence Models

  •    Python

NOTE: THE CODE IS UNDER DEVELOPMENT, PLEASE ALWAYS PULL THE LATEST VERSION FROM HERE. In recent years, sequence-to-sequence (seq2seq) models are used in a variety of tasks from machine translation, headline generation, text summarization, speech to text, to image caption generation. The underlying framework of all these models are usually a deep neural network which contains an encoder and decoder. The encoder processes the input data and a decoder receives the output of the encoder and generates the final output. Although simply using an encoder/decoder model would, most of the time, produce better result than traditional methods on the above-mentioned tasks, researchers proposed additional improvements over these sequence to sequence models, like using an attention-based model over the input, pointer-generation models, and self-attention models. However, all these seq2seq models suffer from two common problems: 1) exposure bias and 2) inconsistency between train/test measurement. Recently a completely fresh point of view emerged in solving these two problems in seq2seq models by using methods in Reinforcement Learning (RL). In these new researches, we try to look at the seq2seq problems from the RL point of view and we try to come up with a formulation that could combine the power of RL methods in decision-making and sequence to sequence models in remembering long memories. In this paper, we will summarize some of the most recent frameworks that combines concepts from RL world to the deep neural network area and explain how these two areas could benefit from each other in solving complex seq2seq tasks. In the end, we will provide insights on some of the problems of the current existing models and how we can improve them with better RL models. We also provide the source code for implementing most of the models that will be discussed in this paper on the complex task of abstractive text summarization.

code-review-tips - :microscope: Common problems to look for in a code review

  •    Javascript

Code reviews can inspire dread in both reviewer and reviewee. Having your code analyzed can feel as invasive as being screened by the TSA as you go off to your vacation. Even worse, reviewing other people's code can feel like a painful and ambiguous exercise, searching for problems and not even knowing where to begin. This project aims to provide some solid tips for how to review the code that you and your team write. All examples are written in JavaScript, but the advice should be applicable to any project of any language. This is by no means an exhaustive list, but hopefully this will help you catch as many bugs as possible long before users ever see your feature.

awesome-scalability - Scalable, Available, Stable, Performant, and Intelligent System Design Patterns

  •    

An updated and curated list of readings to illustrate best practices and patterns in building scalable, available, stable, performant, and intelligent large-scale systems. Concepts are explained in the articles of prominent engineers and credible references. Case studies are taken from battle-tested systems that serve millions to billions of users. Understand your problems: scalability problem (fast for a single user but slow under heavy load) or performance problem (slow for a single user) by reviewing some design principles and checking how scalability and performance problems are solved at tech companies. The section of intelligence are created for those who work with data and machine learning at big (data) and deep (learning) scale.

ctci_v6 - :books: Cracking the Coding Interview 6th edition problems

  •    Java

:books: Cracking the Coding Interview 6th edition problems

DAE Tools Project

  •    C++

Equation-oriented process modelling and optimization software

Audivolv

  •    Java

The plan: Human moves mouse to control realtime generated music which artificial intelligence (AI) changes to try to control Human's hand on mouse. AI translates music problems to programming problems, organizing Humans unconsciously through internet to build AI. --- Versions 0.2 and 0.3 were never finished, so 0.1.8 is newest. The code of the version 0.2 zip file expanded into my other projects, Human AI Net, Giga Line Compile, BayesianCortex, Physicsmata, and a few others. I will eventua

OpenLB - Library for Lattice Boltzmann Simulations

  •    C++

OpenLB is a C++ library for the implementation of lattice Boltzmann simulations which addresses a vast range of problems in computational fluid dynamics. The package is mainly intended as a programming support for researchers and engineers who simulate fluid flows by means of a lattice Boltzmann method.

JSLint - The JavaScript Code Quality Tool

  •    Javascript

JSLint is a JavaScript program that looks for problems in JavaScript programs. It is a code quality tool. JSLint takes a JavaScript source and scans it. If it finds a problem, it returns a message describing the problem and an approximate location within the source. The problem is not necessarily a syntax error, although it often is. JSLint looks at some style conventions as well as structural problems. It does not prove that your program is correct.

cppclean - Finds problems in C++ source that slow development of large code bases

  •    Python

cppclean attempts to find problems in C++ source that slow development in large code bases, for example various forms of unused code. Unused code can be unused functions, methods, data members, types, etc to unnecessary #include directives. Unnecessary #includes can cause considerable extra compiles increasing the edit-compile-run cycle. This is a fork of the original cppclean project. The original project home page, which no longer contains code, is at https://code.google.com/p/cppclean/.

kotlin-99 - Ninety-Nine Problems in Kotlin

  •    Kotlin

This an adaptation of Ninety-Nine Scala Problems by Phil Gold which itself is an adaptation of the Ninety-Nine Prolog Problems written by Werner Hett at the Berne University of Applied Sciences in Berne, Switzerland. Some problems have been altered to be more amenable to programming in Kotlin. You might want to do these problems if you want to learn Kotlin, are interested in the problems described below, or both. The main reason to prefer this to using websites like hackerrank.com and codewars.com is that there is no vendor lock-in and no hidden agenda pursued by the website owner.

system-design-interview - System design interview for IT companies

  •    

System design is a very broad topic. Even a software engineer with many years of working experience at a top IT company may not be an expert on system design. If you want to become an expert, you need to read many books, articles, and solve real large scale system design problems. Spend a few minutes questioning the interviewer and agreeing on the scope of the system. Remember to make sure you know all the requirements the interviewer didn't tell you about in the beginning.