■ このスレッドは過去ログ倉庫に格納されています
米入管、ソフトウェア技術者に対して入国審査でプログラミングの筆記試験を実施 [163221131]
- 1 :アザラシ伍長 ◆n3FrWDzmJGlV (ワッチョイWW 29a8-DL+Z):2017/03/04(土) 00:41:31.07 ID:QaZ0qIMH0●.net ?PLT(34337) ポイント特典
-
ニューヨークのジョンFケネディー空港の入国管理当局が、ナイジェリアからの外国人ソフトウェア技術者の入国審査にあたって、当人が本当にソフトウェア技術者なのかを試すためにプログラミングの筆記試験を実施していたことが1日、LinkedInへの書き込みに基づくBBCの報道で明らかとなった。
入管でプログラミングの筆記試験を強要されたのは、Celestine Omin, 28というナイジェリア国籍のソフトウェア技術者で、2月28日に約24時間のフライトの末、JFK空港に到着。その後、入管で入国審査を受けた際に、プログラミングの筆記試験を受けさせられる羽目に陥った模様となる。
Celestine Ominによると、入管による筆記試験の内容は、
Write a function to check if a Binary Search Tree is balanced.What is an abstract class, and why do you need it?
だったとしており、彼による解答内容については、その後、入管からは間違っていることを指摘されたとしているが、驚いたことに、それにも関わらず、入国審査そのものはパスして米国への入国が認められたとしている。
その上で彼は、筆記試験に落第したのにも関わらず、入国審査にパスしたのは、入管が彼の採用元企業に電話で問い合わせを行い、身元確認を行ったためではないかとしている。
入管によるプログラミングの筆記試験は、この種の問題としては一般的なもので、大学の理工学部卒業者程度の専門知識を問うものとなっている。
(続く)
- 2 :番組の途中ですがアフィサイトへの\(^o^)/です (ワッチョイ 0b7f-nju/):2017/03/04(土) 00:42:55.86 ID:ZAS0PsT70.net
- 嫌儲にレス書き込むときも何らかの筆記試験を設けるべき
- 3 :番組の途中ですがアフィサイトへの\(^o^)/です (ブーイモ MM4d-CqFM):2017/03/04(土) 00:43:28.07 ID:BxZ1u8RkM.net
- COBOLしかできない人はどうなる
- 4 :アザラシ伍長 ◆n3FrWDzmJGlV (ワッチョイWW 29a8-DL+Z):2017/03/04(土) 00:44:19.72 ID:QaZ0qIMH0?PLT(33337)
-
それぞれ、最初の問題の模範解答例(C言語の回答例の場合)は、
/* C program to check if a tree is height-balanced or not */ #include<stdio.h>
#include<stdlib.h>
#define bool int
/* A binary tree node has data, pointer to left child
and a pointer to right child */
struct node
{
int data;
struct node* left;
struct node* right;
};
/* Returns the height of a binary tree */
int height(struct node* node);
/* Returns true if binary tree with root as root is height-balanced */
bool isBalanced(struct node *root)
{
int lh; /* for height of left subtree */
int rh; /* for height of right subtree */
/* If tree is empty then return true */
if(root == NULL)
return 1;
/* Get the height of left and right sub trees */
lh = height(root->left);
rh = height(root->right);
if( abs(lh-rh) <= 1 &&
isBalanced(root->left) &&
isBalanced(root->right))
return 1;
/* If we reach here then tree is not height-balanced */
return 0;
}
/* UTILITY FUNCTIONS TO TEST isBalanced() FUNCTION */
(main関数が続く)
- 5 :アザラシ伍長 ◆n3FrWDzmJGlV (ワッチョイWW 29a8-DL+Z):2017/03/04(土) 00:44:28.53 ID:QaZ0qIMH0?PLT(33337)
-
/* returns maximum of two integers */
int max(int a, int b)
{
return (a >= b)? a: b;
}
/* The function Compute the "height" of a tree. Height is the
number of nodes along the longest path from the root node
down to the farthest leaf node.*/
int height(struct node* node)
{
/* base case tree is empty */
if(node == NULL)
return 0;
/* If tree is not empty then height = 1 + max of left
height and right heights */
return 1 + max(height(node->left), height(node->right));
}
/* Helper function that allocates a new node with the
given data and NULL left and right pointers. */
struct node* newNode(int data)
{
struct node* node = (struct node*)
malloc(sizeof(struct node));
node->data = data;
node->left = NULL;
node->right = NULL;
return(node);
}
int main()
{
struct node *root = newNode(1);
root->left = newNode(2);
root->right = newNode(3);
root->left->left = newNode(4);
root->left->right = newNode(5);
root->left->left->left = newNode(8);
if(isBalanced(root))
printf("Tree is balanced");
else
printf("Tree is not balanced");
getchar();
return 0;
}
Source: geeksforgeeks.org
- 6 :番組の途中ですがアフィサイトへの\(^o^)/です (ブーイモ MM4d-CqFM):2017/03/04(土) 00:45:27.12 ID:BxZ1u8RkM.net
- プログラム=C
- 7 :アザラシ伍長 ◆n3FrWDzmJGlV (ワッチョイWW 29a8-DL+Z):2017/03/04(土) 00:46:09.90 ID:QaZ0qIMH0?PLT(33337)
-
抽象クラスについての解答例は、
Abstract classes are classes that contain one or more abstract methods. An abstract method is a method that is declared, but contains no implementation.
Abstract classes may not be instantiated, and require subclasses to provide implementations for the abstract methods. Let's look at an example of an abstract class, and an abstract method.
Suppose we were modeling the behavior of animals, by creating a class hierachy that started with a base class called Animal. Animals are capable of doing different things like flying, digging and walking, but there are some common operations as well like eating and sleeping.
Some common operations are performed by all animals, but in a different way as well. When an operation is performed in a different way, it is a good candidate for an abstract method (forcing subclasses to provide a custom implementation).
Let's look at a very primitive Animal base class, which defines an abstract method for making a sound (such as a dog barking, a cow mooing, or a pig oinking).
(ソースが続く)
- 8 :アザラシ伍長 ◆n3FrWDzmJGlV (ワッチョイWW 29a8-DL+Z):2017/03/04(土) 00:46:27.90 ID:QaZ0qIMH0?PLT(33337)
-
public abstract Animal
public abstract Animal
{
public void eat(Food food)
{
// do something with food....
}
public void sleep(int hours)
{
try
{
// 1000 milliseconds * 60 seconds * 60 minutes * hours
Thread.sleep ( 1000 * 60 * 60 * hours);
}
catch (InterruptedException ie) { /* ignore */ }
}
public abstract void makeNoise();
}
Source: www.javacoffeebreak.com
- 9 :アザラシ伍長 ◆n3FrWDzmJGlV (ワッチョイWW 29a8-DL+Z):2017/03/04(土) 00:47:24.78 ID:QaZ0qIMH0?PLT(33337)
-
ソース
http://newsln.jp/news/201703020812470000.html
上手く貼れなかったからソース元を見てください
- 10 :番組の途中ですがアフィサイトへの\(^o^)/です (ワッチョイ 412c-NqFr):2017/03/04(土) 00:47:46.66 ID:mZ4V2Wcq0.net
- プログラミング言語って万国共通なん?
- 11 :番組の途中ですがアフィサイトへの\(^o^)/です (ワッチョイWW 4948-KGPx):2017/03/04(土) 00:49:47.17 ID:qMTAviY00.net
- 試験することの何が問題なの?
- 12 :番組の途中ですがアフィサイトへの\(^o^)/です (ワッチョイW 4948-1RA+):2017/03/04(土) 00:50:17.53 ID:5leM71Ew0.net
- やばい、できない。
- 13 :番組の途中ですがアフィサイトへの\(^o^)/です (オイコラミネオ MM8b-LuEe):2017/03/04(土) 00:56:01.11 ID:iTQrO/6RM.net
- 二分木検索の問題?これって?
こんなん答えられるプログラマーなんか少ないし
答えられるようなプログラマーは専門卒の新米やろ。
検索なんか、sqlか、linqか、そなオブジェクトについてるfindメソッド叩くだけやからな。
二分木の検索ロジック書いてるようなプログラマーいたらドン引き&クビや。
- 14 :番組の途中ですがアフィサイトへの\(^o^)/です (スッップ Sd33-T97P):2017/03/04(土) 00:57:05.16 ID:BTyCcvtcd.net
- これ別に完答する必要はないだろ
答えさせればわかる
- 15 :番組の途中ですがアフィサイトへの\(^o^)/です (ワッチョイWW 4137-KBki):2017/03/04(土) 01:03:06.48 ID:FT4VAhbR0.net
- >>13
書くとしたら電池駆動の小型商品の
組み込みソフトぐらいかな
記録したログのソートとか
- 16 :アザラシ伍長 ◆n3FrWDzmJGlV (ワッチョイWW 29a8-DL+Z):2017/03/04(土) 01:15:42.34 ID:QaZ0qIMH0?PLT(33337)
-
二分木探索はオンメモリでデータ持ってる時にやるでしょ
- 17 :番組の途中ですがアフィサイトへの\(^o^)/です (ワッチョイWW b9d0-+LoG):2017/03/04(土) 01:19:11.82 ID:CnVns+yz0.net
- バランスのチェックだけなのに
高さ計算とバランスのチェックと左右それぞれに二度辿ってて無駄が多くねこれ
- 18 :番組の途中ですがアフィサイトへの\(^o^)/です (アウアウエーT Sae3-DkSu):2017/03/04(土) 01:24:05.89 ID:gqe2VDWla.net
- うーん、わからん!
とりあえず問題が職業プログラマのドメインから微妙にずれてるという印象
- 19 :番組の途中ですがアフィサイトへの\(^o^)/です (ワッチョイWW 8bb0-p3v4):2017/03/04(土) 02:03:06.98 ID:wNXW6LcN0.net
- 中国がプログラマー吸収してほしい
- 20 :番組の途中ですがアフィサイトへの\(^o^)/です (ワッチョイWW d965-p+k8):2017/03/04(土) 02:06:04.46 ID:IOcOAw6O0.net
- >>13
オンライン処理にバブルソートのロジック組み込みやがったクソ野郎のことは今でも許していない
- 21 :番組の途中ですがアフィサイトへの\(^o^)/です (ワッチョイ b979-NKwN):2017/03/04(土) 02:10:33.65 ID:npdBgDO50.net
- abstractって抽象かよ
- 22 :番組の途中ですがアフィサイトへの\(^o^)/です (ワッチョイ 5314-7Glm):2017/03/04(土) 02:12:48.11 ID:4I9/KCUe0.net
- mallocしてるのにfreeで解放してなくないか
- 23 :番組の途中ですがアフィサイトへの\(^o^)/です (ワッチョイWW b974-Dk3C):2017/03/04(土) 02:19:26.24 ID:2m3I0wGh0.net
- >>16
いやB木だろ
- 24 :番組の途中ですがアフィサイトへの\(^o^)/です (ワッチョイ 29b5-j1wJ):2017/03/04(土) 02:19:34.93 ID:EvgGTFnK0.net
- 嘘ニュースかと思ったらガチなのか おもしろいな
でも落第なのに入国させちゃったのか
- 25 :番組の途中ですがアフィサイトへの\(^o^)/です (アウアウオー Sa63-tCEH):2017/03/04(土) 02:21:28.09 ID:bb6t3o+Ea.net
- 継承知らんプログラマも結構いるだろ
- 26 :番組の途中ですがアフィサイトへの\(^o^)/です (ワッチョイWW 292f-M/WT):2017/03/04(土) 02:22:37.52 ID:YYgH1VPz0.net
- >>20
www
- 27 :番組の途中ですがアフィサイトへの\(^o^)/です (ワッチョイW 312f-J0nI):2017/03/04(土) 02:38:27.33 ID:sI9TJIdq0.net
- >>13
知識として知ってるだろ
どんだけ無能なんだよ
- 28 :番組の途中ですがアフィサイトへの\(^o^)/です (ドコグロ MMbd-prdN):2017/03/04(土) 02:44:37.22 ID:T2BVeGJVM.net
- ジャップランド的な頭の悪さを感じる
どうしたメリケン
- 29 :番組の途中ですがアフィサイトへの\(^o^)/です (ワッチョイWW 1348-V9xV):2017/03/04(土) 03:53:17.74 ID:bKN5/Bpm0.net
- ちょっとググっていいですか?
- 30 :番組の途中ですがアフィサイトへの\(^o^)/です (JP 0H4b-NqFr):2017/03/04(土) 04:00:59.96 ID:3MEH/5lgH.net
- 実際、ナイジェリア人ってクスリの密売に関係してるヤツばっかりだしな
- 31 :番組の途中ですがアフィサイトへの\(^o^)/です (ワッチョイ 292c-T7IB):2017/03/04(土) 04:18:58.89 ID:hqsSIkkJ0.net
- 思ったよりいい問題出しててワラタ
日本のいわゆるIT業界の人だと98%くらいは1問目の題意自体理解できなさそう
>>17
どうせオーダーは変わらないしたぶんbalancedの定義通りに書いたらこうなるっていう意味での模範解答じゃないの
というかこれをきれいに一発で計算するのって難しくないか
前者だけだと両方に同じだけ長い一本道があればアウト
後者だけだと1つだけ高さが違うまま片方に無限に長くできる
- 32 :番組の途中ですがアフィサイトへの\(^o^)/です (ワッチョイW d129-w/oi):2017/03/04(土) 06:04:48.48 ID:V5JVDLMh0.net
- >>df = pd.read_csv('halloworld.csv')
>>print(df)
>>hallowork.go.jp
- 33 :番組の途中ですがアフィサイトへの\(^o^)/です (アウアウオー Sa63-tCEH):2017/03/04(土) 10:08:53.89 ID:bb6t3o+Ea.net
- PGなんて動けばよかろうだから、抽象クラスとインターフェースクラスの違いなんて
いちいち言葉にして書いたことはないと思う
- 34 :番組の途中ですがアフィサイトへの\(^o^)/です (ワッチョイ 1347-EN75):2017/03/04(土) 10:18:33.21 ID:vDqpAeqk0.net
- 模範解答だとこんな感じの木でも真になりそうだけどいいのか
0 ------- * -------
1 ---*--- ---*---
2 -*- -*- -*- -*-
3 * * * *
まあどうでもいいけど
- 35 :番組の途中ですがアフィサイトへの\(^o^)/です (ドコグロ MMbd-prdN):2017/03/04(土) 12:26:31.75 ID:T2BVeGJVM.net
- >>31
理解されない物のどこがいい問題なんだよ
コミュ障プログラマっぽい発言だな…
総レス数 35
17 KB
掲示板に戻る
全部
前100
次100
最新50
read.cgi ver.24052200