面试总结之 各类定义题 英文口语

Singleton

private static Singleton firstInstance = null;
    public static Singleton getInstance() {
        if(firstInstance == null) {
            
            // This is here to test what happens if threads try
            // to create instances of this class
            
            if(firstThread){
            
                firstThread = false;
                
                try {
                    Thread.currentThread();
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                
                    e.printStackTrace();
                }
            }
            
            // Here we just use synchronized when the first object
            // is created
            
            synchronized(Singleton.class){ 
            
                if(firstInstance == null) {
                    // If the instance isn't needed it isn't created
                    // This is known as lazy instantiation
            
                    firstInstance = new Singleton();
            
                    // Shuffle the letters in the list
                    Collections.shuffle(firstInstance.letterList);
                    
                }
            
            }
            
        }
        
        // Under either circumstance this returns the instance
        
        return firstInstance;
    }
In software engineering, the singleton pattern is a design pattern that restricts
 the instantiation of a class to one object. This is useful when exactly one object
  is needed to coordinate actions across the system. The concept is sometimes generalized
   to systems that operate more efficiently when only one object exists, or that restrict
    the instantiation to a certain number of objects. The term comes from the mathematical
     concept of a singleton.

 

 

Factory 

// This is a factory thats only job is creating ships
// By encapsulating ship creation, we only have one
// place to make modifications

public class ENEMYSHIPFACTORY{
    
    // This could be used as a static method if we
    // are willing to give up subclassing it
    
    public ENEMYSHIP makeEnemyShip(String newShipType){
        
        //ENEMYSHIP newShip = null;
        
        if (newShipType.equals("U")){
            
            return new UFOENEMYSHIP();
            
        } else 
        
        if (newShipType.equals("R")){
            
            return new ROCKETENEMYSHIP();
            
        } else 
        
        if (newShipType.equals("B")){
            
            return new BIGUFOENEMYSHIP();
            
        } else return null;
        
    }
    
}
When a method returns one of several possible classes that share a commom super class

the factory pattern allows you to create objects without specifying the exact class of 
object that will be created.

 

 

 a virtual function or virtual method is a function or method whose behavior can be overridden within an inheriting class by a function with the same signature. This concept is a very important part of the polymorphism portion of object-oriented programming (OOP).

 

"A pure virtual function or pure virtual method is a virtual function that is required to be implemented by a derived class that is not abstract" - Wikipedia

So, the virtual function can be overriden and the pure virtual must be implemented.

 

As the name inheritance suggests an object is able to inherit characteristics from another object. In more concrete terms, an object is able to pass on its state and behaviors to its children. For inheritance to work the objects need to have characteristics in common with each other.

 

static:

 

static variables are shared by the entire class, not a specific instance (unlike normal member variables)
static methods are also shared by the entire class

static can be used around a block of code in a class to specify code that runs when the virtual machine is first started up, before instances of the class are created.

 

 

(计算机编程英语词汇)

算法常用术语中英对照
Data Structures 基本数据结构
Dictionaries 字典
Priority Queues 堆        
Graph Data Structures 图
Set Data Structures 集合
Kd-Trees 线段树
Numerical Problems 数值问题
Solving Linear Equations 线性方程组
Bandwidth Reduction 带宽压缩
Matrix Multiplication 矩阵乘法
Determinants and Permanents 行列式
Constrained and Unconstrained Optimization 最值问题
Linear Programming 线性规划
Random Number Generation 随机数生成
Factoring and Primality Testing 因子分解/质数判定
Arbitrary Precision Arithmetic 高精度计算
Knapsack Problem 背包问题
Discrete Fourier Transform 离散Fourier 变换
Combinatorial Problems 组合问题
Sorting 排序
Searching 查找
Median and Selection 中位数
Generating Permutations 排列生成
Generating Subsets 子集生成
Generating Partitions 划分生成
Generating Graphs 图的生成
Calendrical Calculations 日期
Job Scheduling 工程安排
Satisfiability 可满足性
Graph Problems -- polynomial 图论-多项式算法
Connected Components 连通分支
Topological Sorting 拓扑排序
Minimum Spanning Tree 最小生成树
Shortest Path 最短路径
Transitive Closure and Reduction 传递闭包
Matching 匹配
Eulerian Cycle / Chinese Postman Euler 回路/中国邮路
Edge and Vertex Connectivity 割边/割点
Network Flow 网络流
Drawing Graphs Nicely 图的描绘
Drawing Trees 树的描绘
Planarity Detection and Embedding 平面性检测和嵌入
Graph Problems -- hard 图论-NP 问题
Clique 最大团
Independent Set 独立集
Vertex Cover 点覆盖
Traveling Salesman Problem 旅行商问题
Hamiltonian Cycle Hamilton 回路
Graph Partition 图的划分
Vertex Coloring 点染色
Edge Coloring 边染色
Graph Isomorphism 同构
Steiner Tree Steiner 树
Feedback Edge/Vertex Set 最大无环子图
Computational Geometry 计算几何
Convex Hull 凸包
Triangulation 三角剖分
Voronoi Diagrams Voronoi 图
Nearest Neighbor Search 最近点对查询
Range Search 范围查询
Point Location 位置查询
Intersection Detection 碰撞测试
Bin Packing 装箱问题
Medial-Axis Transformation 中轴变换
Polygon Partitioning 多边形分割
Simplifying Polygons 多边形化简
Shape Similarity 相似多边形
Motion Planning 运动规划
Maintaining Line Arrangements 平面分割
Minkowski Sum Minkowski 和
Set and String Problems 集合与串的问题
Set Cover 集合覆盖
Set Packing 集合配置
String Matching 模式匹配
Approximate String Matching 模糊匹配
Text Compression 压缩
Cryptography 密码
Finite State Machine Minimization 有穷自动机简化
Longest Common Substring 最长公共子串
Shortest Common Superstring 最短公共父串
DP——Dynamic Programming——动态规划
recursion ——递归


编程词汇
A2A integration A2A 整合
abstract 抽象的
abstract base class (ABC)抽象基类
abstract class 抽象类
abstraction 抽象、抽象物、抽象性
access 存取、访问
access level 访问级别
access function 访问函数
account 账户
action 动作
activate 激活
active 活动的
actual parameter 实参
adapter 适配器
add-in 插件
address 地址
address space 地址空间
address-of operator 取地址操作符
ADL (argument-dependent lookup)
ADO(ActiveX Data Object)ActiveX 数据对象
advanced 高级的
aggregation 聚合、聚集
algorithm 算法
alias 别名
align 排列、对齐
allocate 分配、配置
allocator 分配器、配置器
angle bracket 尖括号
annotation 注解、评注
API (Application Programming Interface)应用(程序)编程接口
app domain (application domain)应用域
application 应用、应用程序
application framework 应用程序框架
appearance 外观
append 附加
architecture 架构、体系结构
archive file 归档文件、存档文件
argument 引数(传给函式的值)。参见parameter
array 数组
arrow operator 箭头操作符
ASP(Active Server Page)活动服务器页面
ASP.NET worker process ASP.NET 工作者进程
assembly 装配件、配件
assembly language 汇编语言
assembly manifest 装配件清单
assert(ion)断言
assign 赋值
assignment 赋值、分配
assignment operator 赋值操作符
associated 相关的、相关联的
associative container 关联式容器(对应sequential container)
asynchronous 异步的
atomic 原子的
atomic operation 原子操作
attribute 特性、属性
authentication service 验证服务
authorization 授权
audio 音频
A.I. 人工智能
B2B integration B2B 整合、B2B 集成(business-to-business integration)
background 背景、后台(进程)
backward compatible 向后兼容、向下兼容
backup 备份
backup device 备份设备
backup file 备份文件
bandwidth 带宽
base class 基类
base type 基类型
batch 批处理
BCL (base class library)基类库
binary 二进制
binary search 二分查找
binary tree 二叉树
binary function 双参函数
binary large object 二进制大对象
binary operator 二元操作符
binding 绑定
bit 位
bitmap 位图
bitwise 按位...
bitwise copy 为单元进行复制;位元逐一复制,按位拷
bitwise operation 按位运算
block 块、区块、语句块
bookkeeping 簿记
boolean 布林值(真假值,true 或false)
border 边框
bounds checking 边界检查
boxing 装箱、装箱转换
brace (curly brace)大括号、花括号
bracket (square brakcet)中括号、方括号
breakpoint 断点
browser applications 浏览器应用(程序)
browser-accessible application 可经由浏览器访问的应用程序
build 编连(专指编译和连接
built-in 内建、内置
bus 总线
business 业务、商务(看场合)
business Logic 业务逻辑
business rules 业务规则
buttons 按钮
bug 臭虫
by/through 通过
byte 位元组(由8 bits 组成)
cache 高速缓存
calendar 日历
call 调用
callback 回调
call-level interface (CLI)调用级接口(CLI)
call operator 调用操作符
candidate key 候选键(for database)
cascading delete 级联删除(for database)
cascading update 级联更新(for database)
casting 转型、造型转换
catalog 目录
chain 链(function calls)
character 字符
character format 字符格式
character set 字符集
CHECK constraints CHECK 约束(for database)
checkpoint 检查点(for database)
check box 复选框
check button 复选按钮
child class 子类
CIL (common intermediate language)通用中间语言、通用中介语言
class 类
class declaration 类声明
class definition 类定义
class derivation list 类继承列表
class factory 类厂
class hierarchy 类层次结构
class library 类库
class loader 类装载器
class template 类模板
class template partial specializations 类模板部分特化
class template specializations 类模板特化
classification 分类
clause 子句
client application 客户端应用程序
client cursor 客户端游标(for database)
code page 代码页
cleanup 清理、清除
CLI (Common Language Infrastructure) 通用语言基础设施
client 客户、客户端

转载于:https://www.cnblogs.com/leetcode/p/3203371.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
taoke面试主要涉及图形推理、定义判断和语言理解三个方面。 图形推理:图形推理是指通过观察和分析一系列图形或图案的规律,进而推断出下一个图形或图案的特征或形状。在taoke面试中,可能会给出一系列图形,并要求我们根据已有的规律来推断出下一个图形的形状或特征。我们需要通过观察图形的变化、对称性、重复性等特点来发现规律并进行推理。 定义判断:定义判断是指根据给定的定义和条件,判断某个事物或概念是否符合这些定义或条件。在taoke面试中,可能会给出一些定义或条件,然后让我们判断某个事物或概念是否符合这些定义或条件。我们需要仔细阅读并理解定义和条件,根据定义和条件是否满足来进行判断。 语言理解:语言理解是指对于文字材料的理解和分析能力。在taoke面试中,可能会给出一段文字材料,让我们根据文字材料中的信息来回答相关问。我们需要仔细阅读并理解文字材料,提取出关键信息,并根据这些信息来回答问。 在taoke面试中,这三个方面都是重要的能力要求。图形推理能力体现了我们的观察力和逻辑推理能力,定义判断能力体现了我们的逻辑思维能力,语言理解能力则体现了我们的阅读理解和分析能力。通过良好的准备和实际操作,我们可以在面试中展现出这些能力,提高自己的竞争力。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值