📣 黑五价提前开抢|VIP一年通行证5折,蓝莓、Offer多多同步特惠
回复: 6
跳转到指定楼层
上一主题 下一主题
收起左侧

Cisco intern sde oa 大合集

 
全局:

2022(1-3月) 码农类General 硕士 实习@cisco - 网上海投 - 在线笔试  | 😐 Neutral 🙂 Easy | Other | 应届毕业生

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看附件。没有帐号?注册账号

x
1.  BestTimetoBuyandSellStock
类似买卖股票最佳时间的一道题(Medium)

1. BirthdayCount
找基数个数的生日

/**
* In the hostel, there are birthday celebrations every month. Given N number of days which are representing the
* birthday, find the number of days where there are an odd number of birthday celebrations.
* <p>
* Input
* The first line of the input consists of an integer - days_size representing the number of birthdays celebrations(N).
* The second line of the input consists of N space-separate integers - days, representing the birthdays' celebrations
* in a month.
* <p>
* Output
* Print an integer representing the number of days where there is an odd number of birthday celebrations.
* <p>
* Constraints
* 0 ≤ days_size ≤ 10^3
* 0 < days[i] ≤ 31; Where i is representing the index of the days
* 0 ≤ i < days_size
* <p>
* Example
* Input:
* 5
* 4 8 2 8 9
* Output:
* 3
* Explanation:
* There are 5 numbers in this array. 4 has occurred once which is odd, so it meets the criteria, 8 doesn't as it has
* occurred twice, 2and 9 meet the criteria of occurring an odd number of times. So.the output is 3.
*/

2. DecodeWays
给一串全是数字的String 类似“100200300” 或者“99” 问转换成字母有多少种不同interpretation
(字母表a=0 b=1 ... z=25然后input是一串数字 需要算一共有多少种转化成字母的方法 111有三种bbb/bl/lb 99只能是jj所‍‌‌‌‌‍‍‌‌‌‌‌‌‍‍‍‌‍‍‌以只有一种)
动态规划:

/**
* Consider a coding system where letters are represented as sequential decimal numbers starting from 0,
* (i.e., a=O, b=1, c=2 .... z=25). Given a string of digits (e.g. "123") as input, print out the number of valid
* interpretations of letters.
*
* Write an algorithm to calculate the number of valid interpretations of the letters formed by the given input.
* Input
* The first line of input consists of a string - decInput, representing the decimal numbers.
* Output
* Print an integer representing the number of valid interpretations for the letters formed by the given string of digits.
*/

4. DititalAddEqualFindNumber
各个位相加等于某数
given int x
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies
representing the x coordinate of the queen;
*     The third line of the input consists of an integer cord_x2, representing the x coordinate of the opponent piece;
*     The fourth line of the input consists of an integer cord_y2, representing the y coordinate of the opponent piece.
*
*     Output
*     Print a sting "Yes" if the queen can attack the opponent piece. Otherwise, print "No"
*
*     Examples
*
*     Example1:
*     Input:
*     4
*     5
*     6
*     7
*     Output:
*     Yes
*     Explanation:
*     When the queen is located at position (4 5) and the opponent piece is located at position (6 7), the queen may attack the piece in a diagonal attack.
*
*     Example 2:
*     Input:
*     1
*     1
*     3
*     2
*     output:
*     No
*/

28. Rotate matrix 90 degrees
Rotate image  默认answer[100][100], 重置m, n,行列copy;

/**
* Question
* Write an algorithm to rotate the image by 90 degrees right.
* lnput
* The first line of the input consists of two space-separated integers - matrix_rows and matrix_cols, representing the
* number of rows of the matrix(N) and number of columns of the matrix(M);
* The next N lines consist of M space-separated integers, representing the pixel of the matrix.
* Output
* Print M lines consist of N space-separated integers representing the rotated image by 90 degrees.
* Example
* Input:
* 3 3
* 123
* 456
* 789
* output:
* 741
* 852
* 963
*/

30. Word Search 变种

评分

参与人数 14大米 +39 收起 理由
shyccf + 2 很有用的信息!
mmmmodi + 1 给你点个赞!
jaja01 + 1 给你点个赞!
wahahayaya + 1 很有用的信息!
erictt + 1 赞一个!

查看全部评分


上一篇:mathworks店面
下一篇:亚麻 2022 SDE intern 面经
全局:
Somebodywhocare 发表于 2022-03-04 19:32:34
厉害,楼主已经做过了吗
做了一共三道题,不用开摄像头,90分钟。都是原题,我做的是统计二进制中一的个数,平均数众数,ipv4
回复

使用道具 举报

全局:
厉害,楼主已经做过了吗
回复

使用道具 举报

全局:
今天不想吃晚饭 发表于 2022-3-5 00:32
做了一共三道题,不用开摄像头,90分钟。都是原题,我做的是统计二进制中一的个数,平均数众数,ipv4

好嘞,我抓紧做
回复

使用道具 举报

全局:
谢谢大佬 🙏
回复

使用道具 举报

全局:
感谢分享!
回复

使用道具 举报

🔗
H1B_LUCK 2022-9-10 23:08:03 | 只看该作者
全局:
感谢大佬
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表