Codility – Lesson 2 Arrays – OddOccurrencesInArray

プログラミング能力を評価するオンラインテスト、Codilityで、Lesson 2 Arrays – OddOccurrencesInArrayに回答しました。

問題と結果画面
66%の評価。

問題と結果画面
100%の評価。
for文を2つから1つに。

問題と結果画面
100%の評価。
XOR演算子を使えばこんなに簡潔にも書ける。
ビット演算っておもしろい。

Codility – Lesson 2 Arrays – CyclicRotation

プログラミング能力を評価するオンラインテスト、Codilityで、Lesson 2 Arrays – CyclicRotationに回答しました。

問題と結果画面
100%の評価。

Codility – Lesson 1 Iterations – BinaryGap

プログラミング能力を評価するオンラインテスト、Codilityで、Lesson 1 Iterations – BinaryGapに回答しました。

問題と結果画面
100%の評価。

Debussy’s ‘Arabesque No.1’ 20150604

I love playing the piano. I’d like to practice more.
But, I cannot spare much time for it these days.

Null Coalescing Operator

41q0omfytxl-_sx331_bo1204203200_

C# 5.0 in a Nutshell: The Definitive Reference by Definitive Reference Kindle Edition
by Joseph Albahari, Ben Albahari.

The ?? operator:
– can be used with both nullable types and reference types.
– says “If the operand is non-null, give it to me; otherwise, give me a default value.”
– equivalent to calling GetValueOrDefault with an explicit default value, except that the expression for the default value is never evaluated if the variable is not null.

Albahari & Albahari, C# 5.0 In a Nutshell: The Definitive Reference, 156-157.

ページトップへ