zoukankan      html  css  js  c++  java
  • OCTO电话面试悲剧

    Behavior Questions:

    whom is your favorite programer? why?

    why you use Python? why not others?

    could you describe your project now? why you don't use some other open source tools? how is the server structure? how you do connections between different servers?

    may i know how do you design database? schema?

    did your app support parallel running? do you use concurrency in Python? 

    Coding Question:

     

    Write a function which takes in a string as an argument and returns a dictionary with the following three key, value pairs:

    “num_letters”, number of letters in the string

    “num_digits”, number of digits in the string

    “num_neither”, number of characters that are neither letters nor digits in the string

    First Solution:

    def calcStr(str_):
        num_letters, num_digits, num_neither = 0, 0, 0
        result_ = { ‘num_letters’:0, ‘num_digits’: 0, ‘num_neither’: 0}
        for char_ in str_:
            if is_digit(char_):
                num_digits += 1
            elif is_str(char_):
                num_letters += 1
            else:
                num_neither += 1
        result_[‘num_digits’]=num_digits
        result_[‘num_letters’]=num_letters
        result_[‘num_neither’]=num_neither
        return result_

    Followed questions:

    Can you do it without for loop?

    Do you know comprehension?

    Can you do it with some python way?

    Can you do it with map?

    Do you have any questions?

    I should ask more technical queries about work and what they expect the position people to do.

    1. what do you expect from the candidate? why you need a new hand?

    2. may i know if python and angular.js will be the main technology for this position?

  • 相关阅读:
    Java中Comparable与Comparator的区别
    LeetCode[5] 最长的回文子串
    LeetCode[3] Longest Substring Without Repeating Characters
    LeetCode 7. Reverse Integer
    统计单词出现的次数
    System.arraycopy()和Arrays.copyOf()的区别
    SyncToy
    查看端口占用及进程号
    TCP协议
    python 的日志logging模块学习
  • 原文地址:https://www.cnblogs.com/t--c---/p/3779163.html
Copyright © 2011-2022 走看看