www.fatihkabakci.com

Personal Website and Computer Science TUR EN

Interview questions


This section is a solution page of most common interview questions which have been asked by companies such as Facebook, Google, Apple etc. during the interviews. The questions mostly have been taken from LeetCode platform.

Interview Question Two Sum

Solution by Fatih KABAKCI

The problem is finding a sub array which has indices of two elements in an array that if adding of cor[..]



Interview Question Add Two Numbers

Solution by Fatih KABAKCI

The problem is to add digits in the same order in two linked lists, by creating a new linked list then [..]


Interview Question Longest Substring Without Repeating Characters

By Fatih KABAKCI

The problem is to find length of the longest substring without repeating characters in a given string. In order[..]



Interview Question Median of Two Sorted Arrays

By Fatih KABAKCI

The problem is finding the median value of two sorted arrays. As everyone knows, median value is the middle ele[..]



Interview Question Longest Palindromic Substring

By Fatih KABAKCI

The problem is to figure out what the longest palindromic substring is in a given string. For the basic solutio[..]



Interview Question ZigZag Conversion

By Fatih KABAKCI

The problem is to convert a string to a new pattern which is called zigzag that shapes characters in rows. Algo[..]



Interview Question Reverse Integer

By Fatih KABAKCI

The problem is to reverse an integer that is entered by the user. The main points of the solution are to check [..]



Interview Question String to Integer (atoi)

By Fatih KABAKCI

The problem is to convert a String to a Integer by considering all possible input elements to give correct outp[..]



Interview Question Palindrome Number

By Fatih KABAKCI

The problem is to find out given an integer whether it is palindrome. There is a space restriction in this pr[..]



Interview Question Regular Expression Matching

By Fatih KABAKCI

The problem is to implement a regular expression matching algorithm that supports for the regex elements '.[..]



Interview Question Container With Most Water

By Fatih KABAKCI

The problem is to figure out largest container that it can retain most water among other containers that their [..]



Interview Question Integer To Roman

By Fatih KABAKCI

The problem is to convert an integer value which is defined between 1 and 3999, to roman value.

Proble[..]

Interview Question Roman to Integer

By Fatih KABAKCI

The problem is to convert a roman numeral to an integer value.

Problem #13 - Roman to Integer

[..]


Interview Question Longest Common Prefix

By Fatih KABAKCI

The problem is to find a longest common prefix string in a string array. For example, when the input is {



Interview Question 3Sum

By Fatih KABAKCI

The problem is to figure out all unique triplets in a given array which sum of any 3 elements in that array is [..]



Interview Question 3Sum Closest

By Fatih KABAKCI

The problem is to find out the sum of three integers in an array which sum of them is closest to the target tha[..]



Interview Question Letter Combinations of a Phone Number

By Fatih KABAKCI

The problem is to have all letter combinations of a given digit in regard to phone keypad. The solution in Java[..]



Interview Question 4Sum

By Fatih KABAKCI

The problem is to find out all unique quadruplets in the array which the sum of any 4 elements is a specified t[..]



Interview Question Remove Nth Node From End of List

By Fatih KABAKCI

The problem is to be able to delete nth node from end of the list in a given linked list by one passing at a ti[..]



Interview Question Valid Parentheses

By Fatih KABAKCI

The problem is to find out if the input are composed by valid parentheses. The opening and closing brackets mus[..]



Interview Question Merge Two Sorted Lists

By Fatih KABAKCI

The problem is to merge two sorted list into a new list.

Problem #21 - Merge Two Sorted Lists

[..]


Interview Question Merge k Sorted Lists

By Fatih KABAKCI

The problem is to merge k-sorted lists and return it as a new one. We can take an inspiration the problem



Interview Question Swap Nodes in Pairs

By Fatih KABAKCI

The problem is to swap each consecutive two nodes and return the same linked list.

Problem #24 - Swap [..]

Interview Question Remove Duplicates From Sorted Array

By Fatih KABAKCI

The problem is to eliminate an array from it's duplicated elements.

Problem #26 - Remove Duplicat[..]

Interview Question Remove Element

By Fatih KABAKCI

The problem is to remove all instances of a value, which is given by outside, from the array.

Problem [..]

Interview Question Implement strStr()

By Fatih KABAKCI

The problem is to implement a substring method that takes two parameters. If the first one includes the second [..]



Interview Question Hamming Distance

By Fatih KABAKCI

The problem is to figure out how many corresponding bits are different of given x and y. This is known as humm[..]



Interview Question Number Complement

By Fatih KABAKCI

The problem is to find out complement of a number.

Problem #476 - Number Complement

Desc[..]



Interview Question Fizz Buzz

By Fatih KABAKCI

The problem is to return a list that has corresponding string values between 1 and number that has been provide[..]



Interview Question Reverse String

By Fatih KABAKCI

The problem is to return reverse of a given string.

Problem #344 - Reverse String

Descri[..]



Interview Question Max Consecutive Ones

By Fatih KABAKCI

The problem is to find out maximum number of consecutive ones in a given array.

Problem #485 - Max Con[..]

Interview Question Island Perimeter

By Fatih KABAKCI

The problem is to calculate perimeter of an island which is being represented as two dimensional array that its[..]



Interview Question Keyboard Row

By Fatih KABAKCI

The problem is to find out which words can be typed by the characters which are in same row in an American keyb[..]



Interview Question Next Greater Element I

By Fatih KABAKCI

The problem is to figure out if there is something greater in the second array than right of the element in the[..]



Interview Question Detect Capital

By Fatih KABAKCI

The problem is to detect the correct using of capitals in regard to the rules which have been exposed in the fo[..]



Interview Question Array Partition I

By Fatih KABAKCI

Problem #561 - Array Partition I

Description: Given an array of 2n integers, your t[..]



Interview Question Reshape the Matrix

By Fatih KABAKCI

The problem is to create a function that reshapes the matrix to a new form that satisfies the matrix size, in a[..]



Interview Question Judge Route Circle

By Fatih KABAKCI

The problem is to determine if movements of a robot end up in starting point that is 0,0 in the beginning.

[..]


Interview Question Search Insert Position

By Fatih KABAKCI

The problem is to figure out what the index of the target value would be in a sorted array. If the target value[..]



Interview Question Length of Last Word

By Fatih KABAKCI

The problem is to figure out the length of the last word in a String object.

Problem #58: Length of L[..]

Sub Set of Given Size of an Array

Written by: Fatih Kabakci

The problem is to figure out sub sets of an set in a given size. A recursive approach will fit to this[..]




The Topics in Computer Science

Search this site for





 

Software & Algorithms

icon

In mathematics and computer science, an algorithm is a step-by-step procedure for calculations. Algorithms are used for calculation, data processing, and automated reasoning.

Programming Languages

icon

A programming language is a formal constructed language designed to communicate instructions to a machine, particularly a computer. It can be used to create programs to control the behavior of a machine. Java,C, C++,C#

Database

icon

A database is an organized collection of data. The data are typically organized to model aspects of reality in a way that supports processes requiring information.

Hardware

icon

Computer hardware is the collection of physical elements that constitutes a computer system. Computer hardware refers to the physical parts or components of a computer such as the monitor, memory, cpu.

Web Technologies

icon

Web development is a broad term for the work involved in developing a web site for the Internet or an intranet. Html,Css,JavaScript,ASP.Net,PHP are one of the most popular technologies. J2EE,Spring Boot, Servlet, JSP,JSF, ASP

Mobile Technologies

icon

Mobile application development is the process by which application software is developed for low-power handheld devices, such as personal digital assistants, enterprise digital assistants or mobile phones. J2ME

Network

icon

A computer network or data network is a telecommunications network that allows computers to exchange data. In computer networks, networked computing devices pass data to each other along data connections.

Operating Systems

icon

An operating system is software that manages computer hardware and software resources and provides common services for computer programs. The OS is an essential component of the system software in a computer system. Linux,Windows

Computer Science

icon

Computer science is the scientific and practical approach to computation and its applications.A computer scientist specializes in the theory of computation and the design of computational systems.