Posts for Technology Category
Database Interview Questions – Easy 2

Database Interview Questions – Easy 2

Second Highest Salary

This original question can be handled from https://leetcode.com/problems/second-highest-salary/

Write a SQL query to get the second highest salary from the Employee table.

+----+--------+ | Id | Salary | +----+--------+ | 1 | 100 | | 2 | 200 | | 3 | 300 | +----+--------+

For example, given the above Employee table, the query should return 200 as the second highest salary. If there is no second highest salary, then the query should return null.

+---------------------+ | SecondHighestSalary | +---------------------+ | 200 ...
Database Interview Questions – Easy  1

Database Interview Questions – Easy 1

This question handled from https://leetcode.com/problems/combine-two-tables/

Table: Person

+-------------+---------+ | Column Name | Type | +-------------+---------+ | PersonId | int | | FirstName | varchar | | LastName | varchar | +-------------+---------+ PersonId is the primary key column for this table.

Table: Address

+-------------+---------+ | Column Name | Type | +-------------+---------+ | AddressId...
Merge Sort

Merge Sort

The straightforward approach to implementing merging is to design a method that merges two disjoint ordered arrays of Comparable objects into a third array. This strategy is easy to implement: create an output array of the requisite size and then choose successively the smallest remaining item from the two input arrays to be the...

Bubble Sort

Bubble Sort

This sorting algorithm is comparison-based algorithm in which each pair of adjacent elements is compared and the elements are swapped if they are not in order. This algorithm is not suitable for large data sets as its average and worst case complexity are of ?(n2) where?n?is the number of items.

Although bubble sort is one of...

Quick Sort

Quick Sort

Quicksort is a divide-and-conquer method for sorting. It works by partitioning an array into two subarrays, then sorting the subarrays independently.

Quicksort is complementary to mergesort: for mergesort, we break the array into two subarrays to be sorted and then combine the ordered subarrays to make the whole ordered array; for quicksort, we rearrange...

Shell Sort

Shell Sort

To exhibit the value of knowing properties of elementary sorts, we next consider a fast algorithm based on insertion sort. Insertion sort is slow for large unordered arrays because the only exchanges it does involve adjacent entries, so items can move through the array only one place at a time. For example, if the...

Insertion Sort

Insertion Sort

The algorithm that people often use to sort bridge hands is to consider the cards one at a time, inserting each into its proper place among those already considered (keeping them sorted). In a computer implementation, we need to make space to insert the current item by moving larger items one position to the...

Selection Sort

Selection Sort

Selection sort is the one of the well known sorting algorithms. This sorting algorithm is an in-place comparison-based algorithm in which the list is divided into two parts, the sorted part at the left from small to large values and the unsorted part at the right end. At first, the sorted part is empty array/list...

All Git Commands for Developers

All Git Commands for Developers

In this blog, we can see all git commands necessary for developers such as config, init, clone, add, commit, diff, reset, status, rm, log, branch, show, tag, checkout, push, pull, remote stash and so forth

git config

This command sets the author name and email address respectively to be used with your commits.

Usage:?git config ?global user.name ?[name]?

Usage:?git...

MySQL Docker Installation

MySQL Docker Installation

The MySQL Docker images maintained by the MySQL team are built specifically for Linux platforms. Other platforms are not supported, and users using these MySQL Docker images on them are doing so at their own risk. If you have MySQL installed and running locally on your laptop, I suggest that you stop it before creating...

About Me

I am a dad of two wonderful boys, Utku Efe and Omer Eren, and married with Elif. In addition, I am an academician and AI/ML scientist because I worked more than 15 years in universities, have M.S and Ph.D. thesis and more than 20 scientific papers/presentations and 100 citations. Now people call me as a Principal Developer in my last company :).
I am really hungry on learning new technologies and get more fun while developing new softwares.

Stay Connected

×