4 Commits

  1. 160
      gsd-questions.tex
  2. BIN
      images/logo.jpg

160
gsd-questions.tex

@ -1,5 +1,9 @@
\documentclass[a4paper,11pt]{article}
\documentclass[a4paper,10pt]{article}
\usepackage{a4wide}
\usepackage{german}
\usepackage{graphicx}
\usepackage{versions}
\usepackage{amsmath}
\usepackage{color}
\usepackage{colortbl}
@ -16,13 +20,143 @@
\setlength{\parindent}{0mm}
\begin{document}
\vspace*{-3cm}
\hspace*{-1cm}\begin{tabular}{p{.55\linewidth}p{.55\linewidth}}
\begin{minipage}{\linewidth}
{\bf Global Software Development} \\
Kreiker, Pape, Rieger, Todtenh"ofer\\
Summer Term 2018\\\\
\today\\
\end{minipage}
&
\includegraphics[width=\linewidth]{images/logo}
\end{tabular}
\begin{center}
{\Large\bf GSD Interview Questions}\\
\end{center}
%\def\loesung{}
\textsc{Hochschule Fulda}{\small\hfill GSD Database \& SQL questionnaire}\\
{\small Fachbereich Angewandte Informatik{\small\hfill SS 18}\\
Dipl.-Inf. Christian Pape}\\
\section{Programming}
\subsection{Row Vectors}
Consider an $n\times m$ matrix. Calculate the absolute value for each row vector of the matrix in a programming language of your choice. Example:
$$
\left(\begin{array}{cc}
2 & 2 \\ 4 & 4 \\ 6 & 5
\end{array}\right)
\qquad \Rightarrow \qquad\texttt{calcAbsRowVector}\qquad \Rightarrow \qquad
\left(\begin{array}{c}
2.82 \\ 5.65 \\ 7.81
\end{array}\right)
$$
\ifdefined\loesung
\begin{verbatim}
Musterloesung here
\end{verbatim}
\fi
\subsection{Merging and Sorting}
Let $A$ and $B$ be two arrays of $n$ (unsorted) integer entries each. Write
a function that merges both arrays into a \emph{sorted} array of $2\dot n$
entries. Example:
$$
\begin{array}{lcl}
A & = & [2, 7, 5, 34]\\
B & = & [3, 48, 4, 72]\\
\hline
C & = & [2, 3, 4, 5, 7, 34, 48, 72]\\
\end{array}
$$
\ifdefined\loesung
\begin{verbatim}
Musterloesung here
\end{verbatim}
\fi
\subsection{Recursion}
Consider a herd of cows. Write a \emph{recursive} function to calculate the
sum of all legs. Use addition only (no multiplication allowed).
\ifdefined\loesung
\begin{verbatim}
Musterloesung here
\end{verbatim}
\fi
\section{Algorithms and Data Structures}
\subsection{In-situ List Reversal}
Describe an algorithm to reverse a singly-linked list that \emph{does not}
copy any memory cells.
\ifdefined\loesung
\textcolor{red}{
{\bf Solution}: Maintain three pointers following each other: current, next, and
previous. The first pointer is one element ahead of the second. Reverse each pointer
as you you.}
\fi
\subsection{Preorder Tree Traversal}
Consider the following tree and state the \emph{preorder} and \emph{inorder} traversal.
\begin{verbatim}
5
/ \
7 4
\ / \
1 2 9
\end{verbatim}
Which data structure do you need to implement such a traversal?
\ifdefined\loesung
\textcolor{red}{
{\bf Solution}: Preorder: 5, 7, 1, 4, 2, 9; Inorder: 7, 1, 5, 2, 4, 9.
Such traversals are implemented using a stack (explicitly or implicitly using
a recursive traversal)}
\fi
\subsection{Breadth-First-Search}
What is the BFS traversal of the tree above? Which data structure is needed to implement
such a traversal?
\ifdefined\loesung
\textcolor{red}{
{\bf Solution}: BFS: 5, 7, 4, 1, 2, 9. You need a queue to implement BFS.}
\fi
\section{Networking}
\section{Regular Expressions and Shells}
\subsection{Regular Expression}
Explain the following regex:
\begin{verbatim}
^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
\end{verbatim}
\ifdefined\loesung
\textcolor{red}{
{\bf Solution}: This regex describes well-formatted IPv4 addresses. Number of repetitions
given in braces, Question mark for optional choices, brackets denote ranges.}
\fi
\subsection{Extract Lines}
Write a shell command to extract lines number 101-110 from a file {\tt a.txt} and
output them (numerically sorted) to file {\tt b.txt}.
\ifdefined\loesung\textcolor{red}{
{\bf Solution}: {\tt cat a.txt | head -110 | tail -10 | sort -n > b.txt}}
\fi
\subsection{Large Files}
Write a shell command to find the file with the most number of lines in
the current directory.
\ifdefined\loesung\textcolor{red}{
{\bf Solution}: {\tt wc -l * | sort -nr} is key. One might get rid of the \emph{total} line count
and access the file name only. Optional.}
\fi
\section{Databases}
%------------------------------------------------------------------------------
\textbf{Task 1 (SQL statements):}\\
\subsection{SQL statements}
%------------------------------------------------------------------------------
Write down the results of the following SQL statements on table T.
\begin{quote}
@ -102,13 +236,8 @@ T & A & B & C \\
\end{quote}
\end{description}
\pagebreak
\textsc{Hochschule Fulda}{\small\hfill GSD Database \& SQL questionnaire}\\
{\small Fachbereich Angewandte Informatik{\small\hfill SS 18}\\
Dipl.-Inf. Christian Pape}\\
%------------------------------------------------------------------------------
\textbf{Task 2 (constraints \& integrity):}\\
\subsection{Constraints \& Integrity}
%------------------------------------------------------------------------------
The following table definition with integrity constraints are given.
\begin{quote}
@ -175,13 +304,8 @@ Nr. & INSERT-statement & Violated constraint \\[0.3cm]
\hline
\end{tabular}
\pagebreak
\textsc{Hochschule Fulda}{\small\hfill GSD Database \& SQL questionnaire}\\
{\small Fachbereich Angewandte Informatik{\small\hfill SS 18}\\
Dipl.-Inf. Christian Pape}\\
%------------------------------------------------------------------------------
\textbf{Task 3 (relations \& DDL-statements):}\\
\subsection{Relations \& DDL-statements}
%------------------------------------------------------------------------------
The following tables and DDL-statements are given. Please note: an exam with a grade other than 5.0 is passed.
\begin{figure}[htb]
@ -194,8 +318,6 @@ The following tables and DDL-statements are given. Please note: an exam with a g
\end{minipage}
\end{figure}
\begin{description}
\item[a.)] What is defined in the table {\tt STUDENT}?
\ifdefined\loesung \textcolor{red}{

BIN
images/logo.jpg

After

Width: 2362  |  Height: 591  |  Size: 232 KiB

Loading…
Cancel
Save